diff options
| author | 2022-08-04 09:41:10 +0200 | |
|---|---|---|
| committer | 2022-08-04 12:46:16 +0200 | |
| commit | 1676c2f04ead9a4e5844b48392bd5c44d477ce49 (patch) | |
| tree | 1a3008c265164e021c74b72fb971463168ffe16b | |
| parent | add greaterThanOrEqualsTo (diff) | |
| download | zig-sqlite-1676c2f04ead9a4e5844b48392bd5c44d477ce49.tar.gz zig-sqlite-1676c2f04ead9a4e5844b48392bd5c44d477ce49.tar.xz zig-sqlite-1676c2f04ead9a4e5844b48392bd5c44d477ce49.zip | |
use a single cImport
Two cImport calls generate incompatible code: we can't use the structs
generated in sqlite.zig in functions in errors.zig for example
Up until now it wasn't actually a problem since in errors.zig we only
ever used constants which does work, but now we want to introduce
functions in this file.
| -rw-r--r-- | c.zig | 3 | ||||
| -rw-r--r-- | errors.zig | 4 | ||||
| -rw-r--r-- | sqlite.zig | 4 |
3 files changed, 5 insertions, 6 deletions
| @@ -0,0 +1,3 @@ | |||
| 1 | pub const c = @cImport({ | ||
| 2 | @cInclude("sqlite3.h"); | ||
| 3 | }); | ||
| @@ -1,8 +1,6 @@ | |||
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | 2 | ||
| 3 | const c = @cImport({ | 3 | const c = @import("c.zig").c; |
| 4 | @cInclude("sqlite3.h"); | ||
| 5 | }); | ||
| 6 | 4 | ||
| 7 | pub const SQLiteExtendedIOError = error{ | 5 | pub const SQLiteExtendedIOError = error{ |
| 8 | SQLiteIOErrRead, | 6 | SQLiteIOErrRead, |
| @@ -7,9 +7,7 @@ const io = std.io; | |||
| 7 | const mem = std.mem; | 7 | const mem = std.mem; |
| 8 | const testing = std.testing; | 8 | const testing = std.testing; |
| 9 | 9 | ||
| 10 | pub const c = @cImport({ | 10 | const c = @import("c.zig").c; |
| 11 | @cInclude("sqlite3.h"); | ||
| 12 | }); | ||
| 13 | 11 | ||
| 14 | pub const Text = @import("query.zig").Text; | 12 | pub const Text = @import("query.zig").Text; |
| 15 | pub const ParsedQuery = @import("query.zig").ParsedQuery; | 13 | pub const ParsedQuery = @import("query.zig").ParsedQuery; |