summaryrefslogtreecommitdiff
path: root/c.zig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* c: add a workaround for SQLITE_TRANSIENT being mistranslatedGravatar Vincent Rischmann2024-04-141-0/+1
| | | | | | | | | | | See https://github.com/ziglang/zig/issues/15893 zig's translate-c creates an invalid type for SQLITE_TRANSIENT on some architectures (aarch64, riscv64 and others). We can work around this by making a C function that returns -1 cast to the proper destructor type and use that from zig (thanks https://github.com/Cloudef for mentioning this in this comment: https://github.com/ziglang/zig/issues/15893#issuecomment-1925092582)
* add wrapper functions when building a loadable extensionGravatar Vincent Rischmann2022-09-181-3/+8
|
* require SQLite >= 3.21.0Gravatar Vincent Rischmann2022-08-141-0/+11
| | | | | | | | | | | | After some testing it turns out we need at least SQLite 3.21.0 to compile. We _could_ work around this and make zig-sqlite work with older SQLite versions but I don't think it's necessary because: * "old" distributions like Debian Buster, RHEL 8 ship with SQLite > 3.21.0 * in any case if people want to build for OSes where SQLite is too old they can use the bundled source code.
* use a single cImportGravatar Vincent Rischmann2022-08-041-0/+3
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.