diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-01-31 15:31:15 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-01-31 15:47:23 +0900 |
| commit | 617ddc62aa4d3153850362526069b85bfaf5e59e (patch) | |
| tree | 6940c577bbecdbf7856ef3c37ab43b256d33da59 /src/jq/saveable_stack.zig | |
| parent | 6be43138338fbe4623c1cd62cf71138873af3a7a (diff) | |
| download | zgjq-617ddc62aa4d3153850362526069b85bfaf5e59e.tar.gz zgjq-617ddc62aa4d3153850362526069b85bfaf5e59e.tar.zst zgjq-617ddc62aa4d3153850362526069b85bfaf5e59e.zip | |
use reference counting to manage JSON value lifetime
Diffstat (limited to 'src/jq/saveable_stack.zig')
| -rw-r--r-- | src/jq/saveable_stack.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jq/saveable_stack.zig b/src/jq/saveable_stack.zig index a3085d6..f3a0b40 100644 --- a/src/jq/saveable_stack.zig +++ b/src/jq/saveable_stack.zig @@ -101,6 +101,10 @@ pub fn SaveableStack(comptime T: type) type { return seg.previous_position.offset == 0; } + pub fn isBeyondSavepointBoundary(self: *Self) bool { + return self.activeSegment().len() == 0; + } + pub fn pop(self: *Self) T { std.debug.assert(!self.isEmpty()); |
