aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/tester1.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-12-06 08:46:39 +0000
committerstephan <stephan@noemail.net>2022-12-06 08:46:39 +0000
commit75435f8b2ddff951d48cbe5271f3549b0b9f3b5a (patch)
treeddad87d4fc188f0c82efdbfd037f0358d036c32a /ext/wasm/tester1.c-pp.js
parent671386c6376b00363ef24fe8732d9e8de1078a7d (diff)
downloadsqlite-75435f8b2ddff951d48cbe5271f3549b0b9f3b5a.tar.gz
sqlite-75435f8b2ddff951d48cbe5271f3549b0b9f3b5a.zip
Rename wasm.cstringToJs() to wasm.cstrToJs() for consistency with other wasm.cstr... APIs.
FossilOrigin-Name: cbf483ea0ba3e6dc08ad7ed654380f818544b4c3cedfdb8aa848a83298268ceb
Diffstat (limited to 'ext/wasm/tester1.c-pp.js')
-rw-r--r--ext/wasm/tester1.c-pp.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/wasm/tester1.c-pp.js b/ext/wasm/tester1.c-pp.js
index 8ba88db18..c32c4e5e8 100644
--- a/ext/wasm/tester1.c-pp.js
+++ b/ext/wasm/tester1.c-pp.js
@@ -547,13 +547,13 @@ self.sqlite3InitModule = sqlite3InitModule;
let cpy = w.scopedAlloc(n+10);
let rc = w.cstrncpy(cpy, cStr, n+10);
T.assert(n+1 === rc).
- assert("hello" === w.cstringToJs(cpy)).
+ assert("hello" === w.cstrToJs(cpy)).
assert(chr('o') === w.getMemValue(cpy+n-1)).
assert(0 === w.getMemValue(cpy+n));
let cStr2 = w.scopedAllocCString("HI!!!");
rc = w.cstrncpy(cpy, cStr2, 3);
T.assert(3===rc).
- assert("HI!lo" === w.cstringToJs(cpy)).
+ assert("HI!lo" === w.cstrToJs(cpy)).
assert(chr('!') === w.getMemValue(cpy+2)).
assert(chr('l') === w.getMemValue(cpy+3));
}finally{
@@ -675,7 +675,7 @@ self.sqlite3InitModule = sqlite3InitModule;
// 'string:flexible' argAdapter() sanity checks...
w.scopedAllocCall(()=>{
const argAd = w.xWrap.argAdapter('string:flexible');
- const cj = (v)=>w.cstringToJs(argAd(v));
+ const cj = (v)=>w.cstrToJs(argAd(v));
T.assert('Hi' === cj('Hi'))
.assert('hi' === cj(['h','i']))
.assert('HI' === cj(new Uint8Array([72, 73])));