Host function to output uint32_t through std::ostream
| 205 | |
| 206 | // Host function to output uint32_t through std::ostream |
| 207 | WasmEdge_Result ExternSTLOStreamU32(void *, |
| 208 | const WasmEdge_CallingFrameContext *, |
| 209 | const WasmEdge_Value *In, |
| 210 | WasmEdge_Value *) { |
| 211 | // Function type: {externref, i32} -> {} |
| 212 | void *Ptr = WasmEdge_ValueGetExternRef(In[0]); |
| 213 | std::ostream &RefOS = *reinterpret_cast<std::ostream *>(Ptr); |
| 214 | RefOS << static_cast<uint32_t>(WasmEdge_ValueGetI32(In[1])); |
| 215 | return WasmEdge_Result_Success; |
| 216 | } |
| 217 | |
| 218 | // Host function to insert {key, val} into std::map<std::string, std::string>. |
| 219 | WasmEdge_Result ExternSTLMapInsert(void *, const WasmEdge_CallingFrameContext *, |
nothing calls this directly
no test coverage detected