authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-03-30 20:38:01-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-03-30 20:38:01-07:00
log6655c6092efbdc8b1aeb89ff9f7a8b05f736916a
tree142cade1c44d892800db30157611d87446275960
parent02d69f50092ee9ecfa552ff94d20fde62edd7adc

std.base64: upgrade to new function pointer semantics


1 files changed, 6 insertions(+), 1 deletions(-)

lib/std/base64.zig+6-1
......@@ -9,11 +9,16 @@ pub const Error = error{
99 NoSpaceLeft,
1010};
1111
12const decoderWithIgnoreProto = switch (@import("builtin").zig_backend) {
13 .stage1 => fn (ignore: []const u8) Base64DecoderWithIgnore,
14 else => *const fn (ignore: []const u8) Base64DecoderWithIgnore,
15};
16
1217/// Base64 codecs
1318pub const Codecs = struct {
1419 alphabet_chars: [64]u8,
1520 pad_char: ?u8,
16 decoderWithIgnore: fn (ignore: []const u8) Base64DecoderWithIgnore,
21 decoderWithIgnore: decoderWithIgnoreProto,
1722 Encoder: Base64Encoder,
1823 Decoder: Base64Decoder,
1924};