@@ -72,17 +72,18 @@ To create a `host table`, `memory`, and `global` instance, developers can use si
7272
7373```c
7474/* Create a host table exported as "table". */
75- WasmEdge_Limit TabLimit = {
76- .HasMax = true, .Shared = false, .Min = 10, .Max = 20};
75+ WasmEdge_LimitContext *TabLimit = WasmEdge_LimitCreateWithMax(10, 20, false, false);
7776WasmEdge_TableTypeContext *HostTType =
7877 WasmEdge_TableTypeCreate(WasmEdge_ValTypeGenFuncRef(), TabLimit);
78+ WasmEdge_LimitDelete(TabLimit);
7979WasmEdge_TableInstanceContext *HostTable =
8080 WasmEdge_TableInstanceCreate(HostTType);
8181WasmEdge_TableTypeDelete(HostTType);
8282
8383/* Create a host memory exported as "memory". */
84- WasmEdge_Limit MemLimit = {.HasMax = true, .Shared = false, .Min = 1, .Max = 2} ;
84+ WasmEdge_LimitContext * MemLimit = WasmEdge_LimitCreateWithMax(1, 2, false, false) ;
8585WasmEdge_MemoryTypeContext *HostMType = WasmEdge_MemoryTypeCreate(MemLimit);
86+ WasmEdge_LimitDelete(MemLimit);
8687WasmEdge_MemoryInstanceContext *HostMemory =
8788 WasmEdge_MemoryInstanceCreate(HostMType);
8889WasmEdge_MemoryTypeDelete(HostMType);
0 commit comments