Fix signature of wasmtime_module_new
This commit is contained in:
@@ -66,7 +66,7 @@ int main() {
|
||||
// Now that we've got our binary webassembly we can compile our module.
|
||||
printf("Compiling module...\n");
|
||||
wasm_module_t *module = NULL;
|
||||
error = wasmtime_module_new(store, &wasm, &module);
|
||||
error = wasmtime_module_new(engine, &wasm, &module);
|
||||
wasm_byte_vec_delete(&wasm);
|
||||
if (error != NULL)
|
||||
exit_with_error("failed to compile module", error, NULL);
|
||||
|
||||
@@ -43,7 +43,7 @@ int main(int argc, const char* argv[]) {
|
||||
// Compile.
|
||||
printf("Compiling module...\n");
|
||||
wasm_module_t *module = NULL;
|
||||
wasmtime_error_t* error = wasmtime_module_new(store, &binary, &module);
|
||||
wasmtime_error_t* error = wasmtime_module_new(engine, &binary, &module);
|
||||
if (!module)
|
||||
exit_with_error("failed to compile module", error, NULL);
|
||||
wasm_byte_vec_delete(&binary);
|
||||
|
||||
@@ -59,7 +59,7 @@ int main() {
|
||||
|
||||
// Compile and instantiate our module
|
||||
wasm_module_t *module = NULL;
|
||||
error = wasmtime_module_new(store, &wasm, &module);
|
||||
error = wasmtime_module_new(engine, &wasm, &module);
|
||||
if (module == NULL)
|
||||
exit_with_error("failed to compile module", error, NULL);
|
||||
wasm_byte_vec_delete(&wasm);
|
||||
|
||||
@@ -67,7 +67,7 @@ int main() {
|
||||
// Now that we've got our binary webassembly we can compile our module.
|
||||
printf("Compiling module...\n");
|
||||
wasm_module_t *module = NULL;
|
||||
error = wasmtime_module_new(store, &wasm, &module);
|
||||
error = wasmtime_module_new(engine, &wasm, &module);
|
||||
wasm_byte_vec_delete(&wasm);
|
||||
if (error != NULL)
|
||||
exit_with_error("failed to compile module", error, NULL);
|
||||
|
||||
@@ -67,7 +67,7 @@ int main() {
|
||||
// Now that we've got our binary webassembly we can compile our module.
|
||||
printf("Compiling module...\n");
|
||||
wasm_module_t *module = NULL;
|
||||
error = wasmtime_module_new(store, &wasm, &module);
|
||||
error = wasmtime_module_new(engine, &wasm, &module);
|
||||
wasm_byte_vec_delete(&wasm);
|
||||
if (error != NULL)
|
||||
exit_with_error("failed to compile module", error, NULL);
|
||||
|
||||
@@ -89,7 +89,7 @@ int main() {
|
||||
wasm_module_t *module = NULL;
|
||||
wasm_trap_t *trap = NULL;
|
||||
wasm_instance_t *instance = NULL;
|
||||
error = wasmtime_module_new(store, &wasm, &module);
|
||||
error = wasmtime_module_new(engine, &wasm, &module);
|
||||
wasm_byte_vec_delete(&wasm);
|
||||
if (error != NULL)
|
||||
exit_with_error("failed to compile module", error, NULL);
|
||||
|
||||
@@ -45,10 +45,10 @@ int main() {
|
||||
wasmtime_error_t *error;
|
||||
wasm_module_t *linking1_module = NULL;
|
||||
wasm_module_t *linking2_module = NULL;
|
||||
error = wasmtime_module_new(store, &linking1_wasm, &linking1_module);
|
||||
error = wasmtime_module_new(engine, &linking1_wasm, &linking1_module);
|
||||
if (error != NULL)
|
||||
exit_with_error("failed to compile linking1", error, NULL);
|
||||
error = wasmtime_module_new(store, &linking2_wasm, &linking2_module);
|
||||
error = wasmtime_module_new(engine, &linking2_wasm, &linking2_module);
|
||||
if (error != NULL)
|
||||
exit_with_error("failed to compile linking2", error, NULL);
|
||||
wasm_byte_vec_delete(&linking1_wasm);
|
||||
|
||||
@@ -158,7 +158,7 @@ int main(int argc, const char* argv[]) {
|
||||
// Compile.
|
||||
printf("Compiling module...\n");
|
||||
wasm_module_t* module = NULL;
|
||||
error = wasmtime_module_new(store, &binary, &module);
|
||||
error = wasmtime_module_new(engine, &binary, &module);
|
||||
if (error)
|
||||
exit_with_error("failed to compile module", error, NULL);
|
||||
wasm_byte_vec_delete(&binary);
|
||||
|
||||
@@ -91,7 +91,7 @@ int main(int argc, const char* argv[]) {
|
||||
// Compile.
|
||||
printf("Compiling module...\n");
|
||||
wasm_module_t* module = NULL;
|
||||
error = wasmtime_module_new(store, &binary, &module);
|
||||
error = wasmtime_module_new(engine, &binary, &module);
|
||||
if (error)
|
||||
exit_with_error("failed to compile module", error, NULL);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ int main() {
|
||||
|
||||
// Compile our modules
|
||||
wasm_module_t *module = NULL;
|
||||
wasmtime_error_t *error = wasmtime_module_new(store, &wasm, &module);
|
||||
wasmtime_error_t *error = wasmtime_module_new(engine, &wasm, &module);
|
||||
if (!module)
|
||||
exit_with_error("failed to compile module", error, NULL);
|
||||
wasm_byte_vec_delete(&wasm);
|
||||
|
||||
Reference in New Issue
Block a user