Skip to content

Instantly share code, notes, and snippets.

@vrischmann
Created June 4, 2023 14:13
Show Gist options
  • Save vrischmann/0d63ca50e34fa4bcd7ebe88e665209ac to your computer and use it in GitHub Desktop.
Save vrischmann/0d63ca50e34fa4bcd7ebe88e665209ac to your computer and use it in GitHub Desktop.
zig translate-c bug
const std = @import("std");
const c = @cImport({
@cInclude("test.h");
});
pub fn main() !void {
const foo = c.SQLITE_TRANSIENT;
_ = foo;
}
typedef void (*sqlite3_destructor_type)(void*);
#define SQLITE_STATIC ((sqlite3_destructor_type)0)
#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment