feat(c-api) Redefine wasm_store_t.

`wasm_store_t` is now a proper struct (rather than an opaque type) of
kind:

```rs
struct wasm_store_t {
    inner: Store
}
```

The rest of the patch updates the code accordingly.
This commit is contained in:
Ivan Enderlin
2020-10-05 21:16:43 +02:00
parent ff4cb6d412
commit 3edcc89698
8 changed files with 38 additions and 69 deletions

View File

@@ -4,7 +4,6 @@ use super::store::wasm_store_t;
use super::trap::wasm_trap_t;
use crate::ordered_resolver::OrderedResolver;
use std::mem;
use std::ptr::NonNull;
use std::sync::Arc;
use wasmer::{Extern, Instance};
@@ -52,7 +51,7 @@ unsafe fn argument_import_iter(
#[no_mangle]
pub unsafe extern "C" fn wasm_instance_new(
store: Option<NonNull<wasm_store_t>>,
_store: &wasm_store_t,
module: &wasm_module_t,
imports: *const *const wasm_extern_t,
// own