aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-wasm.c
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-12-03 11:16:55 +0000
committerstephan <stephan@noemail.net>2022-12-03 11:16:55 +0000
commit85ef4e434415ac8e674f4f92480a38cd7c3a135e (patch)
treef42d3728596de78bd548b6fc5552f63af06ea89e /ext/wasm/api/sqlite3-wasm.c
parent2564ca7d15328a8519248be22829702348253d8e (diff)
downloadsqlite-85ef4e434415ac8e674f4f92480a38cd7c3a135e.tar.gz
sqlite-85ef4e434415ac8e674f4f92480a38cd7c3a135e.zip
JavaScript: add sqlite3.wasm.realloc(), sqlite3.capi.SQLITE_MAX_ALLOCATION_SIZE, and related tests.
FossilOrigin-Name: eeb84ba5de1152ef0f42105b8b285fdee9f5ad58281e60a4e0c8b1d6de1dead8
Diffstat (limited to 'ext/wasm/api/sqlite3-wasm.c')
-rw-r--r--ext/wasm/api/sqlite3-wasm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-wasm.c b/ext/wasm/api/sqlite3-wasm.c
index 9acc8020e..cbc449976 100644
--- a/ext/wasm/api/sqlite3-wasm.c
+++ b/ext/wasm/api/sqlite3-wasm.c
@@ -113,6 +113,12 @@
#endif
/**********************************************************************/
+/* SQLITE_M... */
+#ifndef SQLITE_MAX_ALLOCATION_SIZE
+# define SQLITE_MAX_ALLOCATION_SIZE 0x1fffffff
+#endif
+
+/**********************************************************************/
/* SQLITE_O... */
#ifndef SQLITE_OMIT_DEPRECATED
# define SQLITE_OMIT_DEPRECATED 1
@@ -497,6 +503,10 @@ const char * sqlite3_wasm_enum_json(void){
DefInt(SQLITE_IOCAP_BATCH_ATOMIC);
} _DefGroup;
+ DefGroup(limits) {
+ DefInt(SQLITE_MAX_ALLOCATION_SIZE);
+ } _DefGroup;
+
DefGroup(openFlags) {
/* Noting that not all of these will have any effect in
** WASM-space. */