summaryrefslogtreecommitdiff
path: root/vtab.zig
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2024-12-19 01:09:41 +0100
committerGravatar GitHub2024-12-19 01:09:41 +0100
commitc355f614e82743770b891ed295cb0198ae62f55e (patch)
treeca3be165114f929da14dc0bd87679c0ccdbe89f2 /vtab.zig
parentMerge pull request #172 from JudsenAtFlexgen/Documentation-update (diff)
parentrework execMulti (diff)
downloadzig-sqlite-c355f614e82743770b891ed295cb0198ae62f55e.tar.gz
zig-sqlite-c355f614e82743770b891ed295cb0198ae62f55e.tar.xz
zig-sqlite-c355f614e82743770b891ed295cb0198ae62f55e.zip
Merge pull request #173 from vrischmann/fix-latest-zig
Fix latest zig
Diffstat (limited to 'vtab.zig')
-rw-r--r--vtab.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/vtab.zig b/vtab.zig
index 77a9839..53e46c1 100644
--- a/vtab.zig
+++ b/vtab.zig
@@ -32,7 +32,7 @@ pub const ModuleContext = struct {
32 allocator: mem.Allocator, 32 allocator: mem.Allocator,
33}; 33};
34 34
35fn dupeToSQLiteString(s: []const u8) [*c]const u8 { 35fn dupeToSQLiteString(s: []const u8) [*c]u8 {
36 var buffer: [*c]u8 = @ptrCast(c.sqlite3_malloc(@intCast(s.len + 1))); 36 var buffer: [*c]u8 = @ptrCast(c.sqlite3_malloc(@intCast(s.len + 1)));
37 37
38 mem.copyForwards(u8, buffer[0..s.len], s); 38 mem.copyForwards(u8, buffer[0..s.len], s);
@@ -730,7 +730,7 @@ pub fn VirtualTable(
730 return c.SQLITE_ERROR; 730 return c.SQLITE_ERROR;
731 } 731 }
732 732
733 fn xConnect(db: ?*c.sqlite3, module_context_ptr: ?*anyopaque, argc: c_int, argv: [*c]const [*c]const u8, vtab: [*c][*c]c.sqlite3_vtab, err_str: [*c][*c]const u8) callconv(.C) c_int { 733 fn xConnect(db: ?*c.sqlite3, module_context_ptr: ?*anyopaque, argc: c_int, argv: [*c]const [*c]const u8, vtab: [*c][*c]c.sqlite3_vtab, err_str: [*c][*c]u8) callconv(.C) c_int {
734 const module_context = getModuleContext(module_context_ptr); 734 const module_context = getModuleContext(module_context_ptr);
735 735
736 var arena = heap.ArenaAllocator.init(module_context.allocator); 736 var arena = heap.ArenaAllocator.init(module_context.allocator);