mark exported functions gcsafe

This commit is contained in:
Jacek Sieka 2023-02-22 00:01:28 +01:00
parent c9f77af179
commit 9289ddb53d
2 changed files with 3 additions and 3 deletions

View File

@ -23,9 +23,9 @@
{.experimental: "codeReordering".}
when (NimMajor, NimMinor) < (1, 4):
{.pragma: sqlitedecl, cdecl, raises: [Defect].}
{.pragma: sqlitedecl, cdecl, gcsafe, raises: [Defect].}
else:
{.pragma: sqlitedecl, cdecl, raises: [].}
{.pragma: sqlitedecl, cdecl, gcsafe, raises: [].}
{.compile: "sqlite3_abi/sqlite3.c".}
const
SQLITE_VERSION* = "3.40.1"

View File

@ -24,7 +24,7 @@ nim c -o:wrap --verbosity:0 --hints:off ./sqlite3_abi/wrap.nim
sed -i \
-e "s|cdecl|sqlitedecl|g" \
-e "s|$PWD/||" \
-e 's|{.experimental: "codeReordering".}|{.experimental: "codeReordering".}\nwhen (NimMajor, NimMinor) < (1, 4):\n {.pragma: sqlitedecl, cdecl, raises: [Defect].}\nelse:\n {.pragma: sqlitedecl, cdecl, raises: [].}|' \
-e 's|{.experimental: "codeReordering".}|{.experimental: "codeReordering".}\nwhen (NimMajor, NimMinor) < (1, 4):\n {.pragma: sqlitedecl, cdecl, gcsafe, raises: [Defect].}\nelse:\n {.pragma: sqlitedecl, gcsafe, cdecl, raises: [].}|' \
-e "s|sqlite3_column_text\\*(a1: ptr sqlite3_stmt; iCol: cint): ptr cuchar|sqlite3_column_text\\*(a1: ptr sqlite3_stmt; iCol: cint): cstring|" \
-e "s|sqlite3_value_text\\*(a1: ptr sqlite3_value): ptr cuchar|sqlite3_value_text\\*(a1: ptr sqlite3_value): cstring|" \
sqlite3_abi/sqlite3_gen.nim