feat: update cbor to add support for allocating extraction of arrays

This commit is contained in:
CJ van den Berg 2025-07-14 13:12:40 +02:00
parent 7069d36461
commit 50145dd176
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 6 additions and 2 deletions

View file

@ -230,6 +230,7 @@ pub fn restore_state_v0(self: *Self, data: []const u8) error{
InvalidPIntType,
JsonIncompatibleType,
NotAnObject,
BadArrayAllocExtract,
}!void {
tp.trace(tp.channel.debug, .{"restore_state_v0"});
defer self.sort_files_by_mtime();

View file

@ -57,6 +57,7 @@ pub const Error = error{
InvalidPIntType,
JsonIncompatibleType,
NotAnObject,
BadArrayAllocExtract,
} || std.Thread.SpawnError;
pub fn init(allocator: std.mem.Allocator, handler_ctx: *anyopaque, no_alternate: bool, _: *const fn (ctx: *anyopaque) void) Error!Self {

View file

@ -26,6 +26,7 @@ pub const Error = error{
InvalidPIntType,
JsonIncompatibleType,
NotAnObject,
BadArrayAllocExtract,
};
pub const OutputHandler = fn (context: usize, parent: tp.pid_ref, arg0: []const u8, output: []const u8) void;

View file

@ -280,6 +280,7 @@ pub const DeserializeError = error{
JsonIncompatibleType,
InvalidQueryCbor,
NotAnObject,
BadArrayAllocExtract,
};
pub fn fromCbor(cb: []const u8, allocator: std.mem.Allocator) DeserializeError!struct { *TSQuery, *std.heap.ArenaAllocator } {