diff options
author | stephan <stephan@noemail.net> | 2022-12-14 14:28:54 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-12-14 14:28:54 +0000 |
commit | feb9123a8cc018fd0765ef47e1f5bad5b5b3f2aa (patch) | |
tree | 4d477b6d17ed695177643b28782be6cfdb969156 /ext/wasm/api/sqlite3-api-glue.js | |
parent | bca56f384f82331272128ff06eb580d27bd5ae7b (diff) | |
download | sqlite-feb9123a8cc018fd0765ef47e1f5bad5b5b3f2aa.tar.gz sqlite-feb9123a8cc018fd0765ef47e1f5bad5b5b3f2aa.zip |
Add convenience variants of sqlite3.wasm.peek/poke() for each numeric type to help reduce errors related to typos in the final argument (type-name strings). If wasm.xWrap.FuncPtrAdapter is called as a function, instead of a constructor, it now behaves as if it were called as a constructor (previously it threw an exception).
FossilOrigin-Name: 14e3fc01b929fa3f9a2fdbd93deb4a8aad58c111d46369c772def0437152fa75
Diffstat (limited to 'ext/wasm/api/sqlite3-api-glue.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-glue.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/wasm/api/sqlite3-api-glue.js b/ext/wasm/api/sqlite3-api-glue.js index 21dd34d13..972b4a2e0 100644 --- a/ext/wasm/api/sqlite3-api-glue.js +++ b/ext/wasm/api/sqlite3-api-glue.js @@ -138,7 +138,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ the range of supported argument types. */ [ "sqlite3_progress_handler", undefined, [ - "sqlite3*", "int", new wasm.xWrap.FuncPtrAdapter({ + "sqlite3*", "int", wasm.xWrap.FuncPtrAdapter({ name: 'xProgressHandler', signature: 'i(p)', bindScope: 'context', @@ -180,7 +180,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ "**", "**", "*", "*", "*"], ["sqlite3_total_changes", "int", "sqlite3*"], ["sqlite3_trace_v2", "int", "sqlite3*", "int", - new wasm.xWrap.FuncPtrAdapter({ + wasm.xWrap.FuncPtrAdapter({ name: 'sqlite3_trace_v2::callback', signature: 'i(ippp)', contextKey: (argIndex, argv)=>'sqlite3@'+argv[0] |