Przeglądaj źródła

Add cpp macro in string_object.h (#2660)

Xu Jun 2 lat temu
rodzic
commit
f863d27b3a
1 zmienionych plików z 8 dodań i 0 usunięć
  1. 8 0
      core/iwasm/common/gc/stringref/string_object.h

+ 8 - 0
core/iwasm/common/gc/stringref/string_object.h

@@ -8,6 +8,10 @@
 
 #include "wasm.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef enum EncodingFlag {
     UTF8,
     WTF8,
@@ -110,4 +114,8 @@ wasm_string_rewind(WASMString str_obj, uint32 pos, uint32 count,
 void
 wasm_string_dump(WASMString str_obj);
 
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
 #endif /* end of _STRING_OBJECT_H_ */