mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-16 17:18:57 +00:00
Update c-api examples to Context API
This commit is contained in:
@@ -74,6 +74,8 @@ int main(int argc, const char* argv[]) {
|
||||
printf("Live count %d\n", live_count);
|
||||
printf("Creating store 1...\n");
|
||||
wasm_store_t* store1 = wasm_store_new(engine);
|
||||
wasm_context_t* ctx1 = wasm_context_new(store1, 0);
|
||||
wasm_store_context_set(store1, ctx1);
|
||||
|
||||
printf("Running in store 1...\n");
|
||||
run_in_store(store1);
|
||||
@@ -81,6 +83,8 @@ int main(int argc, const char* argv[]) {
|
||||
|
||||
printf("Creating store 2...\n");
|
||||
wasm_store_t* store2 = wasm_store_new(engine);
|
||||
wasm_context_t* ctx2 = wasm_context_new(store2, 0);
|
||||
wasm_store_context_set(store2, ctx2);
|
||||
|
||||
printf("Running in store 2...\n");
|
||||
run_in_store(store2);
|
||||
|
||||
Reference in New Issue
Block a user