Merge branch 'zig-0.14'
This commit is contained in:
commit
2c28091fe5
4 changed files with 8 additions and 2 deletions
|
|
@ -289,6 +289,7 @@ pub const DeserializeError = error{
|
|||
|
||||
pub fn fromCbor(cb: []const u8, allocator: std.mem.Allocator) DeserializeError!struct { *TSQuery, *std.heap.ArenaAllocator } {
|
||||
var arena = try allocator.create(std.heap.ArenaAllocator);
|
||||
errdefer allocator.destroy(arena);
|
||||
arena.* = std.heap.ArenaAllocator.init(allocator);
|
||||
errdefer arena.deinit();
|
||||
const query = try arena.allocator().create(TSQuery);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue