diff options
Diffstat (limited to 'helpers.zig')
| -rw-r--r-- | helpers.zig | 4 |
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 | }, |