mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
fix mustache.zig for current zig master (0.14.x)
This commit is contained in:
parent
e9fa568751
commit
5808a02466
2 changed files with 3 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
zig-out/
|
||||
zig-cache/
|
||||
.zig-cache/
|
||||
*.tar.gz
|
||||
flake.lock.bak
|
||||
tmp/
|
||||
|
|
|
@ -213,7 +213,7 @@ fn fiobjectify(
|
|||
},
|
||||
.error_set => return fiobjectify(@as([]const u8, @errorName(value))),
|
||||
.pointer => |ptr_info| switch (ptr_info.size) {
|
||||
.One => switch (@typeInfo(ptr_info.child)) {
|
||||
.one => switch (@typeInfo(ptr_info.child)) {
|
||||
.array => {
|
||||
const Slice = []const std.meta.Elem(ptr_info.child);
|
||||
return fiobjectify(@as(Slice, value));
|
||||
|
@ -224,7 +224,7 @@ fn fiobjectify(
|
|||
},
|
||||
},
|
||||
// TODO: .Many when there is a sentinel (waiting for https://github.com/ziglang/zig/pull/3972)
|
||||
.Slice => {
|
||||
.slice => {
|
||||
// std.debug.print("new slice\n", .{});
|
||||
if (ptr_info.child == u8 and std.unicode.utf8ValidateSlice(value)) {
|
||||
return fio.fiobj_str_new(util.toCharPtr(value), value.len);
|
||||
|
|
Loading…
Add table
Reference in a new issue