From ee786070674997ef2120843311a4e6caa6aa4fca Mon Sep 17 00:00:00 2001 From: zach Date: Thu, 19 Sep 2024 15:39:58 -0700 Subject: [PATCH] fix: free isn't a method --- src/call-context.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/call-context.ts b/src/call-context.ts index 9d5b8c3..a4cb74c 100644 --- a/src/call-context.ts +++ b/src/call-context.ts @@ -296,7 +296,7 @@ export class CallContext { const key = item.string(); - this.free(addr); + this[ENV].free(addr); if (key in this.#config) { return this.store(this.#config[key]); @@ -313,7 +313,7 @@ export class CallContext { } const key = item.string(); - this.free(addr); + this[ENV].free(addr); const result = this.getVariable(key); const stored = result ? this[STORE](result.bytes()) || 0 : 0; @@ -329,7 +329,7 @@ export class CallContext { } const key = item.string(); - this.free(addr); + this[ENV].free(addr); if (valueaddr === 0n) { this.deleteVariable(key) @@ -349,7 +349,7 @@ export class CallContext { const copied = new Uint8Array(valueBlock.buffer.byteLength) copied.set(new Uint8Array(valueBlock.buffer), 0) this.setVariable(key, copied); - this.free(valueaddr); + this[ENV].free(valueaddr); } catch (err: any) { this.#logger.error(err.message) this.setError(err) @@ -386,7 +386,7 @@ export class CallContext { } const text = this.#decoder.decode(block.buffer); this.#logger.warn(text); - this.free(addr); + this[ENV].free(addr); }, log_info: (addr: bigint) => { @@ -400,7 +400,7 @@ export class CallContext { } const text = this.#decoder.decode(block.buffer); this.#logger.info(text); - this.free(addr); + this[ENV].free(addr); }, log_debug: (addr: bigint) => { @@ -414,7 +414,7 @@ export class CallContext { } const text = this.#decoder.decode(block.buffer); this.#logger.debug(text); - this.free(addr); + this[ENV].free(addr); }, log_error: (addr: bigint) => { @@ -428,7 +428,7 @@ export class CallContext { } const text = this.#decoder.decode(block.buffer); this.#logger.error(text); - this.free(addr); + this[ENV].free(addr); }, };