1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Refactor the sqlite3_value-to-JS conversion from an internal detail to sqlite3.capi.sqlite3_value_to_js() for use with routines like sqlite3_module::xFilter().

FossilOrigin-Name: f6dbf280f99809a80c99337e4c22a86dea7a35ae41ae9a69144c4502385a0a1f
This commit is contained in:
stephan
2022-12-09 14:46:24 +00:00
parent edfbde52fd
commit 99f30f1cd4
6 changed files with 64 additions and 54 deletions

View File

@ -316,13 +316,11 @@ self.WhWasmUtilInstaller = function(target){
Throws if passed an invalid n.
Pedantic side note: the name "heap" is a bit of a misnomer. In an
Emscripten environment, the memory managed via the stack
allocation API is in the same Memory object as the heap (which
makes sense because otherwise arbitrary pointer X would be
ambiguous: is it in the heap or the stack?).
Pedantic side note: the name "heap" is a bit of a misnomer. In a
WASM environment, the stack and heap memory are all accessed via
the same view(s) of the memory.
*/
target.heapForSize = function(n,unsigned = false){
target.heapForSize = function(n,unsigned = true){
let ctor;
const c = (cache.memory && cache.heapSize === cache.memory.buffer.byteLength)
? cache : heapWrappers();