|
|
@@ -22,12 +22,12 @@
|
|
|
#endif
|
|
|
|
|
|
#if defined(__GNUC__) || defined(__clang__)
|
|
|
-#define DEPRECATED __attribute__((deprecated))
|
|
|
+#define WASM_API_DEPRECATED __attribute__((deprecated))
|
|
|
#elif defined(_MSC_VER)
|
|
|
-#define DEPRECATED __declspec(deprecated)
|
|
|
+#define WASM_API_DEPRECATED __declspec(deprecated)
|
|
|
#else
|
|
|
#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
|
|
|
-#define DEPRECATED
|
|
|
+#define WASM_API_DEPRECATED
|
|
|
#endif
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
@@ -231,7 +231,7 @@ WASM_DECLARE_OWN(engine)
|
|
|
*/
|
|
|
WASM_API_EXTERN own wasm_engine_t* wasm_engine_new(void);
|
|
|
WASM_API_EXTERN own wasm_engine_t* wasm_engine_new_with_config(wasm_config_t*);
|
|
|
-DEPRECATED WASM_API_EXTERN own wasm_engine_t *
|
|
|
+WASM_API_DEPRECATED WASM_API_EXTERN own wasm_engine_t *
|
|
|
wasm_engine_new_with_args(mem_alloc_type_t type, const MemAllocOption *opts);
|
|
|
|
|
|
// Store
|
|
|
@@ -828,12 +828,12 @@ static inline void* wasm_val_ptr(const wasm_val_t* val) {
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
-#define WASM_I32_VAL(i) {.kind = WASM_I32, .of = {.i32 = i}}
|
|
|
-#define WASM_I64_VAL(i) {.kind = WASM_I64, .of = {.i64 = i}}
|
|
|
-#define WASM_F32_VAL(z) {.kind = WASM_F32, .of = {.f32 = z}}
|
|
|
-#define WASM_F64_VAL(z) {.kind = WASM_F64, .of = {.f64 = z}}
|
|
|
-#define WASM_REF_VAL(r) {.kind = WASM_ANYREF, .of = {.ref = r}}
|
|
|
-#define WASM_INIT_VAL {.kind = WASM_ANYREF, .of = {.ref = NULL}}
|
|
|
+#define WASM_I32_VAL(i) {.kind = WASM_I32, .__paddings = {0}, .of = {.i32 = i}}
|
|
|
+#define WASM_I64_VAL(i) {.kind = WASM_I64, .__paddings = {0}, .of = {.i64 = i}}
|
|
|
+#define WASM_F32_VAL(z) {.kind = WASM_F32, .__paddings = {0}, .of = {.f32 = z}}
|
|
|
+#define WASM_F64_VAL(z) {.kind = WASM_F64, .__paddings = {0}, .of = {.f64 = z}}
|
|
|
+#define WASM_REF_VAL(r) {.kind = WASM_ANYREF, .__paddings = {0}, .of = {.ref = r}}
|
|
|
+#define WASM_INIT_VAL {.kind = WASM_ANYREF, .__paddings = {0}, .of = {.ref = NULL}}
|
|
|
|
|
|
#define KILOBYTE(n) ((n) * 1024)
|
|
|
|