| 2653 | } |
| 2654 | |
| 2655 | WASMEDGE_CAPI_EXPORT void WasmEdge_ModuleInstanceAddGlobal( |
| 2656 | WasmEdge_ModuleInstanceContext *Cxt, const WasmEdge_String Name, |
| 2657 | WasmEdge_GlobalInstanceContext *GlobalCxt) noexcept { |
| 2658 | if (Cxt && GlobalCxt) { |
| 2659 | fromModCxt(Cxt)->addHostGlobal( |
| 2660 | genStrView(Name), |
| 2661 | std::unique_ptr<WasmEdge::Runtime::Instance::GlobalInstance>( |
| 2662 | fromGlobCxt(GlobalCxt))); |
| 2663 | } |
| 2664 | } |
| 2665 | |
| 2666 | WASMEDGE_CAPI_EXPORT void |
| 2667 | WasmEdge_ModuleInstanceDelete(WasmEdge_ModuleInstanceContext *Cxt) noexcept { |