aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-glue.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-10-29 07:54:10 +0000
committerstephan <stephan@noemail.net>2022-10-29 07:54:10 +0000
commit8948fbee29f8860ff6d116eaa66626ff11ab8064 (patch)
tree8b2a9b8faa122a7134e2b28485d9126f964763df /ext/wasm/api/sqlite3-api-glue.js
parent053bb22f35c5dd153a62158ed2cc6376b5979212 (diff)
downloadsqlite-8948fbee29f8860ff6d116eaa66626ff11ab8064.tar.gz
sqlite-8948fbee29f8860ff6d116eaa66626ff11ab8064.zip
Move the sqlite3.capi.wasm namespace to sqlite3.wasm. This causes a tiny bit of naming confusion with the sqlite3.wasm *file*, but seems to make more sense than having it as a sub-namespace of capi.
FossilOrigin-Name: 3f16eb18d6186ca972fca952ccac18649e7a905213f589e53c0c9333e695448d
Diffstat (limited to 'ext/wasm/api/sqlite3-api-glue.js')
-rw-r--r--ext/wasm/api/sqlite3-api-glue.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/wasm/api/sqlite3-api-glue.js b/ext/wasm/api/sqlite3-api-glue.js
index 16840e79f..63425e538 100644
--- a/ext/wasm/api/sqlite3-api-glue.js
+++ b/ext/wasm/api/sqlite3-api-glue.js
@@ -20,8 +20,8 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
'use strict';
const toss = (...args)=>{throw new Error(args.join(' '))};
const toss3 = sqlite3.SQLite3Error.toss;
- const capi = sqlite3.capi, wasm = capi.wasm, util = capi.util;
- self.WhWasmUtilInstaller(capi.wasm);
+ const capi = sqlite3.capi, wasm = sqlite3.wasm, util = sqlite3.util;
+ self.WhWasmUtilInstaller(wasm);
delete self.WhWasmUtilInstaller;
/**
@@ -88,7 +88,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
capi[e[0]] = wasm.xWrap.apply(null, e);
}
for(const e of wasm.bindingSignatures.wasm){
- capi.wasm[e[0]] = wasm.xWrap.apply(null, e);
+ wasm[e[0]] = wasm.xWrap.apply(null, e);
}
/* For C API functions which cannot work properly unless
@@ -109,7 +109,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
delete wasm.bindingSignatures;
if(wasm.exports.sqlite3_wasm_db_error){
- util.sqlite3_wasm_db_error = capi.wasm.xWrap(
+ util.sqlite3_wasm_db_error = wasm.xWrap(
'sqlite3_wasm_db_error', 'int', 'sqlite3*', 'int', 'string'
);
}else{
@@ -176,7 +176,6 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
}
/* Wrap the callback in a WASM-bound function and convert the callback's
`(char**)` arguments to arrays of strings... */
- const wasm = capi.wasm;
const cbwrap = function(pVoid, nCols, pColVals, pColNames){
let rc = capi.SQLITE_ERROR;
try {
@@ -399,7 +398,6 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
return __dbArgcMismatch(pDb,"sqlite3_create_function_v2",f.length);
}
/* Wrap the callbacks in a WASM-bound functions... */
- const wasm = capi.wasm;
const uninstall = [/*funcs to uninstall on error*/];
let rc;
try{
@@ -441,7 +439,6 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
return __dbArgcMismatch(pDb,"sqlite3_create_window_function",f.length);
}
/* Wrap the callbacks in a WASM-bound functions... */
- const wasm = capi.wasm;
const uninstall = [/*funcs to uninstall on error*/];
let rc;
try{