From f69ff29aa3598433b6440d6d98ff6bc15f3d3eff Mon Sep 17 00:00:00 2001 From: Charlie Ruan <53290280+CharlieFRuan@users.noreply.github.com> Date: Wed, 7 Aug 2024 03:33:31 -0400 Subject: [PATCH] [Web] Add TVMArgBool to ArgTypeCode --- web/src/ctypes.ts | 5 +++-- web/src/runtime.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/ctypes.ts b/web/src/ctypes.ts index cb2a0e1097b4..c4941f07d57a 100644 --- a/web/src/ctypes.ts +++ b/web/src/ctypes.ts @@ -171,7 +171,7 @@ export type FTVMBackendPackedCFunc = ( /** * int TVMObjectFree(TVMObjectHandle obj); */ - export type FTVMObjectFree = (obj: Pointer) => number; +export type FTVMObjectFree = (obj: Pointer) => number; /** * int TVMObjectGetTypeIndex(TVMObjectHandle obj, unsigned* out_tindex); @@ -252,5 +252,6 @@ export const enum ArgTypeCode { TVMStr = 11, TVMBytes = 12, TVMNDArrayHandle = 13, - TVMObjectRValueRefArg = 14 + TVMObjectRValueRefArg = 14, + TVMArgBool = 15, } diff --git a/web/src/runtime.ts b/web/src/runtime.ts index d71c98e7d1bc..d42f2c001383 100644 --- a/web/src/runtime.ts +++ b/web/src/runtime.ts @@ -2473,6 +2473,7 @@ export class Instance implements Disposable { switch (tcode) { case ArgTypeCode.Int: case ArgTypeCode.UInt: + case ArgTypeCode.TVMArgBool: return this.memory.loadI64(rvaluePtr); case ArgTypeCode.Float: return this.memory.loadF64(rvaluePtr);