Compare commits
2 Commits
e5c1ddcfc3
...
4e7d73dd4e
Author | SHA1 | Date | |
---|---|---|---|
4e7d73dd4e | |||
71a142f60d |
Binary file not shown.
BIN
lib/libsqlite3_x64.a
Normal file
BIN
lib/libsqlite3_x64.a
Normal file
Binary file not shown.
BIN
lib/sqlite3.lib
BIN
lib/sqlite3.lib
Binary file not shown.
@ -2,17 +2,19 @@ package sqlite
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
foreign import sqlite "lib/sqlite3.lib"
|
||||
} else when ODIN_OS == .Darwin && 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_OS == .Darwin {
|
||||
when ODIN_ARCH == .arm64 {
|
||||
foreign import sqlite "lib/libsqlite3_arm64.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
|
17
src/build.sh
17
src/build.sh
@ -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
|
||||
|
8303
src/sqlite3.c
8303
src/sqlite3.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user