mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
std.base64: upgrade to new function pointer semantics
This commit is contained in:
parent
02d69f5009
commit
6655c6092e
@ -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,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user