| ... | @@ -9,11 +9,16 @@ pub const Error = error{ | ... | @@ -9,11 +9,16 @@ pub const Error = error{ |
| 9 | NoSpaceLeft, | 9 | NoSpaceLeft, |
| 10 | }; | 10 | }; |
| 11 | | 11 | |
| | 12 | const decoderWithIgnoreProto = switch (@import("builtin").zig_backend) { |
| | 13 | .stage1 => fn (ignore: []const u8) Base64DecoderWithIgnore, |
| | 14 | else => *const fn (ignore: []const u8) Base64DecoderWithIgnore, |
| | 15 | }; |
| | 16 | |
| 12 | /// Base64 codecs | 17 | /// Base64 codecs |
| 13 | pub const Codecs = struct { | 18 | pub const Codecs = struct { |
| 14 | alphabet_chars: [64]u8, | 19 | alphabet_chars: [64]u8, |
| 15 | pad_char: ?u8, | 20 | pad_char: ?u8, |
| 16 | decoderWithIgnore: fn (ignore: []const u8) Base64DecoderWithIgnore, | 21 | decoderWithIgnore: decoderWithIgnoreProto, |
| 17 | Encoder: Base64Encoder, | 22 | Encoder: Base64Encoder, |
| 18 | Decoder: Base64Decoder, | 23 | Decoder: Base64Decoder, |
| 19 | }; | 24 | }; |