aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-03-28 17:11:07 -0700
committerGitHub <noreply@github.com>2021-03-28 17:11:07 -0700
commitbb5cfbcb722b7e69b343c525803b15eb39d760f8 (patch)
treea83899b9652ada4596b934db48f89337af61ab4a /test
parentbbe6a0dddde0e19b595dddf7e029b3e950ac14a0 (diff)
parent6993087edceb0d80b120f8dd3927d77564f86cb3 (diff)
downloadzig-bb5cfbcb722b7e69b343c525803b15eb39d760f8.tar.gz
zig-bb5cfbcb722b7e69b343c525803b15eb39d760f8.zip
Merge pull request #8305 from jedisct1/base64
std/base64: cleanups & support url-safe and other non-padded variants
Diffstat (limited to 'test')
-rw-r--r--test/standalone/mix_o_files/base64.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/standalone/mix_o_files/base64.zig b/test/standalone/mix_o_files/base64.zig
index 7ded9824a0..b5cfcaba50 100644
--- a/test/standalone/mix_o_files/base64.zig
+++ b/test/standalone/mix_o_files/base64.zig
@@ -3,9 +3,9 @@ const base64 = @import("std").base64;
export fn decode_base_64(dest_ptr: [*]u8, dest_len: usize, source_ptr: [*]const u8, source_len: usize) usize {
const src = source_ptr[0..source_len];
const dest = dest_ptr[0..dest_len];
- const base64_decoder = base64.standard_decoder_unsafe;
- const decoded_size = base64_decoder.calcSize(src);
- base64_decoder.decode(dest[0..decoded_size], src);
+ const base64_decoder = base64.standard.Decoder;
+ const decoded_size = base64_decoder.calcSizeForSlice(src) catch unreachable;
+ base64_decoder.decode(dest[0..decoded_size], src) catch unreachable;
return decoded_size;
}