| ... | ... | @@ -9,11 +9,16 @@ pub const Error = error{ |
| 9 | 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 | 17 | /// Base64 codecs |
| 13 | 18 | pub const Codecs = struct { |
| 14 | 19 | alphabet_chars: [64]u8, |
| 15 | 20 | pad_char: ?u8, |
| 16 | | decoderWithIgnore: fn (ignore: []const u8) Base64DecoderWithIgnore, |
| 21 | decoderWithIgnore: decoderWithIgnoreProto, |
| 17 | 22 | Encoder: Base64Encoder, |
| 18 | 23 | Decoder: Base64Decoder, |
| 19 | 24 | }; |