| 2642 | } |
| 2643 | |
| 2644 | WASMEDGE_CAPI_EXPORT void WasmEdge_ModuleInstanceAddMemory( |
| 2645 | WasmEdge_ModuleInstanceContext *Cxt, const WasmEdge_String Name, |
| 2646 | WasmEdge_MemoryInstanceContext *MemoryCxt) noexcept { |
| 2647 | if (Cxt && MemoryCxt) { |
| 2648 | fromModCxt(Cxt)->addHostMemory( |
| 2649 | genStrView(Name), |
| 2650 | std::unique_ptr<WasmEdge::Runtime::Instance::MemoryInstance>( |
| 2651 | fromMemCxt(MemoryCxt))); |
| 2652 | } |
| 2653 | } |
| 2654 | |
| 2655 | WASMEDGE_CAPI_EXPORT void WasmEdge_ModuleInstanceAddGlobal( |
| 2656 | WasmEdge_ModuleInstanceContext *Cxt, const WasmEdge_String Name, |