Skip to content

Commit

Permalink
fix: free isn't a method
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Sep 19, 2024
1 parent 56cdb73 commit ee78607
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/call-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export class CallContext {

const key = item.string();

this.free(addr);
this[ENV].free(addr);

Check failure on line 299 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 299 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 299 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 299 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

if (key in this.#config) {
return this.store(this.#config[key]);
Expand All @@ -313,7 +313,7 @@ export class CallContext {
}

const key = item.string();
this.free(addr);
this[ENV].free(addr);

Check failure on line 316 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 316 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 316 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 316 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

const result = this.getVariable(key);
const stored = result ? this[STORE](result.bytes()) || 0 : 0;
Expand All @@ -329,7 +329,7 @@ export class CallContext {
}

const key = item.string();
this.free(addr);
this[ENV].free(addr);

Check failure on line 332 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 332 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

if (valueaddr === 0n) {
this.deleteVariable(key)
Expand All @@ -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);

Check failure on line 352 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 352 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.
} catch (err: any) {
this.#logger.error(err.message)
this.setError(err)
Expand Down Expand Up @@ -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);

Check failure on line 389 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 389 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.
},

log_info: (addr: bigint) => {
Expand All @@ -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);

Check failure on line 403 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 403 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.
},

log_debug: (addr: bigint) => {
Expand All @@ -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);

Check failure on line 417 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 417 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.
},

log_error: (addr: bigint) => {
Expand All @@ -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);

Check failure on line 431 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.

Check failure on line 431 in src/call-context.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Argument of type 'bigint' is not assignable to parameter of type 'number'.
},
};

Expand Down

0 comments on commit ee78607

Please sign in to comment.