1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Expose sqlite3_randomness() to WASM and add a custom binding for it which can populate a JS byte array. Add WhWasmUtil.isPtr().

FossilOrigin-Name: 333e67076b4bc967bb543ef8e265c63f6e3498c38ac121a7d1eff4a1d7a71c63
This commit is contained in:
stephan
2022-10-27 03:03:16 +00:00
parent 195687f1bf
commit de868175c3
7 changed files with 200 additions and 46 deletions

View File

@@ -45,7 +45,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
if(v && v.constructor && v instanceof StructBinder.StructType){
v = v.pointer;
}
return (v === (v | 0) /* v is a 32-bit integer */)
return wasm.isPtr(v)
? argPointer(v)
: toss("Invalid (object) type for StructType-type argument.");
});