diff options
| author | 2022-09-11 17:37:06 +0200 | |
|---|---|---|
| committer | 2022-09-18 02:30:19 +0200 | |
| commit | a06f729842c9c1fd858040f53076cdb71e205b11 (patch) | |
| tree | 80a5ac803c30bf5a7069d7508b1e06ab6b5ff9b0 /c.zig | |
| parent | c: add header files specifically for building loadable extensions (diff) | |
| download | zig-sqlite-a06f729842c9c1fd858040f53076cdb71e205b11.tar.gz zig-sqlite-a06f729842c9c1fd858040f53076cdb71e205b11.tar.xz zig-sqlite-a06f729842c9c1fd858040f53076cdb71e205b11.zip | |
add wrapper functions when building a loadable extension
Diffstat (limited to 'c.zig')
| -rw-r--r-- | c.zig | 11 |
1 files changed, 8 insertions, 3 deletions
| @@ -1,6 +1,11 @@ | |||
| 1 | pub const c = @cImport({ | 1 | const root = @import("root"); |
| 2 | @cInclude("sqlite3.h"); | 2 | |
| 3 | }); | 3 | pub const c = if (@hasDecl(root, "loadable_extension")) |
| 4 | @import("c/loadable_extension.zig") | ||
| 5 | else | ||
| 6 | @cImport({ | ||
| 7 | @cInclude("sqlite3.h"); | ||
| 8 | }); | ||
| 4 | 9 | ||
| 5 | // versionGreaterThanOrEqualTo returns true if the SQLite version is >= to the major.minor.patch provided. | 10 | // versionGreaterThanOrEqualTo returns true if the SQLite version is >= to the major.minor.patch provided. |
| 6 | pub fn versionGreaterThanOrEqualTo(major: u8, minor: u8, patch: u8) bool { | 11 | pub fn versionGreaterThanOrEqualTo(major: u8, minor: u8, patch: u8) bool { |