diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-03-30 20:38:01 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-30 20:38:01 -0700 |
| commit | 6655c6092efbdc8b1aeb89ff9f7a8b05f736916a (patch) | |
| tree | 142cade1c44d892800db30157611d87446275960 /lib/std | |
| parent | 02d69f50092ee9ecfa552ff94d20fde62edd7adc (diff) | |
| download | zig-6655c6092efbdc8b1aeb89ff9f7a8b05f736916a.tar.gz zig-6655c6092efbdc8b1aeb89ff9f7a8b05f736916a.zip | |
std.base64: upgrade to new function pointer semantics
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/base64.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/base64.zig b/lib/std/base64.zig index 9e5fa0c25c..866002ca0f 100644 --- a/lib/std/base64.zig +++ b/lib/std/base64.zig @@ -9,11 +9,16 @@ pub const Error = error{ NoSpaceLeft, }; +const decoderWithIgnoreProto = switch (@import("builtin").zig_backend) { + .stage1 => fn (ignore: []const u8) Base64DecoderWithIgnore, + else => *const fn (ignore: []const u8) Base64DecoderWithIgnore, +}; + /// Base64 codecs pub const Codecs = struct { alphabet_chars: [64]u8, pad_char: ?u8, - decoderWithIgnore: fn (ignore: []const u8) Base64DecoderWithIgnore, + decoderWithIgnore: decoderWithIgnoreProto, Encoder: Base64Encoder, Decoder: Base64Decoder, }; |
