Wasmtime
types/structref.hh
Go to the documentation of this file.
1
5#ifndef WASMTIME_TYPES_STRUCTREF_HH
6#define WASMTIME_TYPES_STRUCTREF_HH
7
8#include <wasmtime/types/_structref_class.hh>
9#include <wasmtime/types/_val_class.hh>
10
11namespace wasmtime {
12
13inline StorageType::StorageType(const ValType &ty) {
15 this->ty.valtype = wasm_valtype_copy(ty.capi());
16}
17
18} // namespace wasmtime
19
20#endif // WASMTIME_TYPES_STRUCTREF_HH
Type information about a WebAssembly value.
Definition: types/_val_class.hh:19
const wasm_valtype_t * capi() const
Returns the underlying C API representation of this type.
Definition: types/_val_class.hh:174
#define WASMTIME_STORAGE_TYPE_KIND_VALTYPE
A regular value type (i32, f64, funcref, etc).
Definition: types/structref.h:26
wasm_valtype_t * wasm_valtype_copy(const wasm_valtype_t *)
Creates a new value which matches the provided one.