summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
authorGravatar Ryan Liptak2022-10-31 15:53:27 -0700
committerGravatar Vincent Rischmann2022-11-01 02:26:14 +0100
commit32e8023978af198040d9053e97127d3d0bb5d99f (patch)
tree3293235f07a79a2b84f8a5ca133ee9b182c408fc /sqlite.zig
parentvtab: fix tests when using a db file instead of in memory (diff)
downloadzig-sqlite-32e8023978af198040d9053e97127d3d0bb5d99f.tar.gz
zig-sqlite-32e8023978af198040d9053e97127d3d0bb5d99f.tar.xz
zig-sqlite-32e8023978af198040d9053e97127d3d0bb5d99f.zip
Fix compile error with Zig 0.10.0
Fixes the following error: ``` sqlite.zig:343:50: error: expected type '[*c]const u8', found '[:0]const u8' const result = c.sqlite3_open_v2(path, &db, flags, null); ^~~~ ```
Diffstat (limited to '')
-rw-r--r--sqlite.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 59a43c9..df62794 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -340,7 +340,7 @@ pub const Db = struct {
340 switch (options.mode) { 340 switch (options.mode) {
341 .File => |path| { 341 .File => |path| {
342 var db: ?*c.sqlite3 = undefined; 342 var db: ?*c.sqlite3 = undefined;
343 const result = c.sqlite3_open_v2(path, &db, flags, null); 343 const result = c.sqlite3_open_v2(path.ptr, &db, flags, null);
344 if (result != c.SQLITE_OK or db == null) { 344 if (result != c.SQLITE_OK or db == null) {
345 if (db) |v| { 345 if (db) |v| {
346 diags.err = getLastDetailedErrorFromDb(v); 346 diags.err = getLastDetailedErrorFromDb(v);