MCPcopy Create free account
hub / github.com/csound/csound / getUint8Memory

Function getUint8Memory

wasm/browser/script/polyfilled-transformer.js:16–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15let cachegetUint8Memory = null;
16function getUint8Memory() {
17 if (cachegetUint8Memory === null || cachegetUint8Memory.buffer !== wasm.wasi.memory.buffer) {
18 cachegetUint8Memory = new Uint8Array(wasm.wasi.memory.buffer);
19 }
20 return cachegetUint8Memory;
21}
22
23function getStringFromWasm(ptr, len) {
24 return cachedTextDecoder.decode(getUint8Memory().subarray(ptr, ptr + len));

Callers 3

getStringFromWasmFunction · 0.85
passArray8ToWasmFunction · 0.85
getArrayU8FromWasmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected