Explorar o código

fixed typecast error when compiling in C++ (#179)

Renji Panicker %!s(int64=5) %!d(string=hai) anos
pai
achega
76eea80046
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      core/iwasm/include/lib_export.h

+ 2 - 2
core/iwasm/include/lib_export.h

@@ -15,8 +15,8 @@ typedef struct NativeSymbol {
     void *func_ptr;
 } NativeSymbol;
 
-#define EXPORT_WASM_API(symbol)  {#symbol, symbol}
-#define EXPORT_WASM_API2(symbol) {#symbol, symbol##_wrapper}
+#define EXPORT_WASM_API(symbol)  {#symbol, (void*)symbol}
+#define EXPORT_WASM_API2(symbol) {#symbol, (void*)symbol##_wrapper}
 
 /**
  * Get the exported APIs of base lib