diff options
| author | Taylan Kammer <taylan.kammer@gmail.com> | 2026-01-06 07:45:07 +0100 |
|---|---|---|
| committer | Taylan Kammer <taylan.kammer@gmail.com> | 2026-01-06 07:45:07 +0100 |
| commit | 75185f9fa26b5fc49036008df16c8bb4f1a51a13 (patch) | |
| tree | cb4f7a260f4e83bfbff302a926e12df2ae7007fa /src/zisp/value.zig | |
| parent | e24978c647188c9b80563b535462a794e6eaa52b (diff) | |
Writergate, other 0.16 changes, and test fixes for new grammar.
Diffstat (limited to 'src/zisp/value.zig')
| -rw-r--r-- | src/zisp/value.zig | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/zisp/value.zig b/src/zisp/value.zig index 449a577..2d148ed 100644 --- a/src/zisp/value.zig +++ b/src/zisp/value.zig @@ -170,7 +170,14 @@ const endian = builtin.target.cpu.arch.endian(); const max = std.math.maxInt; /// Used when dealing with runes and short strings. -pub const ShortString = std.BoundedArray(u8, 6); +pub const ShortString = struct { + len: u8, + buf: [6]u8, + + pub fn slice(this: @This()) []const u8 { + return this.buf[0..this.len]; + } +}; /// Used to find the length of a rune or short string. pub fn sstrLen(x: u64) u8 { |
