From a1c695f5be5178cefaa22aac22dff0480a29e61f Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Sun, 14 Apr 2024 19:26:44 +0200 Subject: all: use our workaround function for SQLITE_TRANSIENT --- sqlite.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sqlite.zig') diff --git a/sqlite.zig b/sqlite.zig index be46dea..bd11dea 100644 --- a/sqlite.zig +++ b/sqlite.zig @@ -1676,7 +1676,7 @@ pub const DynamicStatement = struct { const data: []const u8 = field[0..field.len]; // NOTE(vincent): The array is temporary and must be copied, therefore we use SQLITE_TRANSIENT - const result = c.sqlite3_bind_text(self.stmt, column, data.ptr, @intCast(data.len), c.SQLITE_TRANSIENT); + const result = c.sqlite3_bind_text(self.stmt, column, data.ptr, @intCast(data.len), c.sqliteTransientAsDestructor()); return convertResultToError(result); }, else => @compileError("cannot bind field " ++ field_name ++ " of type array of " ++ @typeName(arr.child)), -- cgit v1.2.3