From 9289ddb53d3a370a586c68ecf651ab82fa114f25 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Wed, 22 Feb 2023 00:01:28 +0100 Subject: [PATCH] mark exported functions gcsafe --- sqlite3_abi/sqlite3_gen.nim | 4 ++-- update.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlite3_abi/sqlite3_gen.nim b/sqlite3_abi/sqlite3_gen.nim index 9dc5aad..d779b6a 100644 --- a/sqlite3_abi/sqlite3_gen.nim +++ b/sqlite3_abi/sqlite3_gen.nim @@ -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" diff --git a/update.sh b/update.sh index cb1796b..52754a9 100755 --- a/update.sh +++ b/update.sh @@ -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