summaryrefslogtreecommitdiff
path: root/helpers.zig
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2025-01-17 22:56:54 +0100
committerGravatar Vincent Rischmann2025-01-17 22:56:54 +0100
commit3d61cc7a9eec8673f56ae1ce49a139ffec8d5c14 (patch)
tree346ac35410ed60139fb30a33296682ba640210cb /helpers.zig
parentbuild: fix for latest zig (diff)
downloadzig-sqlite-3d61cc7a9eec8673f56ae1ce49a139ffec8d5c14.tar.gz
zig-sqlite-3d61cc7a9eec8673f56ae1ce49a139ffec8d5c14.tar.xz
zig-sqlite-3d61cc7a9eec8673f56ae1ce49a139ffec8d5c14.zip
all: fix for latest zig
Diffstat (limited to '')
-rw-r--r--helpers.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/helpers.zig b/helpers.zig
index dd7fd4f..344ff02 100644
--- a/helpers.zig
+++ b/helpers.zig
@@ -30,7 +30,7 @@ pub fn setResult(ctx: ?*c.sqlite3_context, result: anytype) void {
30 else => @compileError("cannot use a result of type " ++ @typeName(ResultType)), 30 else => @compileError("cannot use a result of type " ++ @typeName(ResultType)),
31 }, 31 },
32 .pointer => |ptr| switch (ptr.size) { 32 .pointer => |ptr| switch (ptr.size) {
33 .Slice => switch (ptr.child) { 33 .slice => switch (ptr.child) {
34 u8 => c.sqlite3_result_text(ctx, result.ptr, @intCast(result.len), c.sqliteTransientAsDestructor()), 34 u8 => c.sqlite3_result_text(ctx, result.ptr, @intCast(result.len), c.sqliteTransientAsDestructor()),
35 else => @compileError("cannot use a result of type " ++ @typeName(ResultType)), 35 else => @compileError("cannot use a result of type " ++ @typeName(ResultType)),
36 }, 36 },
@@ -67,7 +67,7 @@ pub fn setTypeFromValue(comptime ArgType: type, arg: *ArgType, sqlite_value: *c.
67 arg.* = value > 0; 67 arg.* = value > 0;
68 }, 68 },
69 .pointer => |ptr| switch (ptr.size) { 69 .pointer => |ptr| switch (ptr.size) {
70 .Slice => switch (ptr.child) { 70 .slice => switch (ptr.child) {
71 u8 => arg.* = sliceFromValue(sqlite_value), 71 u8 => arg.* = sliceFromValue(sqlite_value),
72 else => @compileError("cannot use an argument of type " ++ @typeName(ArgType)), 72 else => @compileError("cannot use an argument of type " ++ @typeName(ArgType)),
73 }, 73 },