diff options
| author | 2024-12-19 00:37:36 +0100 | |
|---|---|---|
| committer | 2024-12-19 00:37:36 +0100 | |
| commit | 27d10c1c35eefcf118441018212a13c1d4b52bf8 (patch) | |
| tree | 9f5c005df6eed0518b7d1129a36562169742dca8 | |
| parent | Merge pull request #172 from JudsenAtFlexgen/Documentation-update (diff) | |
| download | zig-sqlite-27d10c1c35eefcf118441018212a13c1d4b52bf8.tar.gz zig-sqlite-27d10c1c35eefcf118441018212a13c1d4b52bf8.tar.xz zig-sqlite-27d10c1c35eefcf118441018212a13c1d4b52bf8.zip | |
fix for latest zig
| -rw-r--r-- | vtab.zig | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -32,7 +32,7 @@ pub const ModuleContext = struct { | |||
| 32 | allocator: mem.Allocator, | 32 | allocator: mem.Allocator, |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | fn dupeToSQLiteString(s: []const u8) [*c]const u8 { | 35 | fn 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); |