Compare commits

..

2 Commits

Author SHA1 Message Date
4e7d73dd4e
Bump sqlite version
Signed-off-by: Paul W <lambdapaul@protonmail.com>
2024-11-09 00:23:49 -05:00
71a142f60d Change callback calling convention to C
Signed-off-by: Paul W. <lambdapaul@protonmail.com>
2024-11-08 22:12:48 -05:00
6 changed files with 5551 additions and 2790 deletions

Binary file not shown.

BIN
lib/libsqlite3_x64.a Normal file

Binary file not shown.

Binary file not shown.

View File

@ -2,17 +2,19 @@ package sqlite
when ODIN_OS == .Windows {
foreign import sqlite "lib/sqlite3.lib"
} else when ODIN_OS == .Darwin && ODIN_ARCH == .arm64 {
} else when ODIN_OS == .Darwin {
when ODIN_ARCH == .arm64 {
foreign import sqlite "lib/libsqlite3_arm64.a"
// } else when ODIN_OS == .Darwin && ODIN_ARCH == .amd64 {
// foreign import sqlite "lib/libsqlite3_x64.a"
} else when ODIN_ARCH == .amd64 {
foreign import sqlite "lib/libsqlite3_x64.a"
}
} else {
foreign import sqlite "system:sqlite3"
}
VERSION :: "3.46.1"
VERSION_NUMBER :: 3046001
SOURCE_ID :: "2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33"
VERSION :: "3.47.0"
VERSION_NUMBER :: 3047000
SOURCE_ID :: "2024-10-21 16:30:22 03a9703e27c44437c39363d0baf82db4ebc94538a0f28411c85dda156f82636e"
@(default_calling_convention = "cdecl", link_prefix = "sqlite3_")
@ -61,7 +63,7 @@ foreign sqlite {
complete :: proc(sql: cstring) -> (success: b32) ---
// omit complete16 :: proc(rawptr sql) ---
busy_handler :: proc(db: ^sqlite3, busy: proc(arg: rawptr, proc_event_call_count: i32) -> i32,arg: rawptr) -> Result ---
busy_handler :: proc(db: ^sqlite3, busy: proc(arg: rawptr, proc_event_call_count: i32) -> i32, arg: rawptr) -> Result ---
busy_timeout :: proc(db: ^sqlite3, ms: i32) -> Result ---
@(deprecated = "This is a legacy interface that is preserved for backwards compatibility. Use of this interface is not recommended.")
@ -770,6 +772,7 @@ Function_Flag :: enum i32 {
SUBTYPE = 0x000100000,
INNOCUOUS = 0x000200000,
RESULT_SUBTYPE = 0x001000000,
SELFORDER1 = 0x002000000,
}
Txn_State :: enum i32 {
@ -998,7 +1001,7 @@ mutex :: struct {}
backup :: struct {}
index_info :: struct {}
callback :: proc(db: rawptr, col: i32, vals: [^]cstring, cols: [^]cstring) -> Result
callback :: proc "c" (db: rawptr, col: i32, vals: [^]cstring, cols: [^]cstring) -> Result
value :: struct {
u: struct #raw_union {}, // MemValue

View File

@ -1,11 +1,11 @@
#!/usr/bin/env bash
set -eu
OS="$(uname -o)"
LIB_A="libsqlite3"
pushd "$(dirname "$0")"
ARCH="$(uname -m)"
OS="$(uname -o)"
LIB_A="libsqlite3_${ARCH}"
if clang -v &> /dev/null; then
CC=clang
@ -17,14 +17,13 @@ else
fi
if [ $OS == "Darwin" ]; then
libtool -V &> /dev/null || { echo "Missing 'libtool'"; exit 2 }
libtool -V &> /dev/null || ( echo "Missing 'libtool'"; exit 2 )
$CC -c -O3 -Qn -arch x86_64 -o "x86_64.o" "./sqlite3.c" -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_TEST_CONTROL
libtool -static "x86_64.o" -o "../lib/${LIB_A}_x64.a"
$CC -c -O3 -Qn -arch arm64 -o "arm64.o" "./sqlite3.c" -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_TEST_CONTROL
libtool -static "arm64.o" -o "../lib/${LIB_A}_arm64.a"
fi
$CC -c -O3 -Qn "./sqlite3.c" -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_TEST_CONTROL
if [ $OS == "Darwin" ]; then
libtool -static "sqlite3.o" -o "../lib/${LIB_A}.a"
fi
rm *.o &> /dev/null
rm *.tmp &> /dev/null

File diff suppressed because it is too large Load Diff