From 2a8cbc91293c8949822cc6183037a9e44611723f Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Fri, 7 Nov 2025 14:58:25 +0000 Subject: [PATCH 1/2] Eliminate nearly all "import *" instances in wasmtime package One case is left for now in wasmtime._ffi, in the interest of keeping the PR less huge. --- ci/cbindgen.py | 49 +- wasmtime/_bindings.py | 2517 +++++++++++++++--------------- wasmtime/_config.py | 4 +- wasmtime/_ffi.py | 3 +- wasmtime/_func.py | 2 +- wasmtime/_globals.py | 17 +- wasmtime/_instance.py | 6 +- wasmtime/_linker.py | 31 +- wasmtime/_memory.py | 17 +- wasmtime/_module.py | 33 +- wasmtime/_sharedmemory.py | 17 +- wasmtime/_store.py | 2 +- wasmtime/_table.py | 23 +- wasmtime/_trap.py | 2 +- wasmtime/_types.py | 2 +- wasmtime/_value.py | 98 +- wasmtime/_wat2wasm.py | 9 +- wasmtime/component/_component.py | 27 +- wasmtime/component/_instance.py | 4 +- 19 files changed, 1432 insertions(+), 1431 deletions(-) diff --git a/ci/cbindgen.py b/ci/cbindgen.py index 9e968382..ff97ca11 100644 --- a/ci/cbindgen.py +++ b/ci/cbindgen.py @@ -17,7 +17,6 @@ def __init__(self): self.ret += '# This is a procedurally generated file, DO NOT EDIT\n' self.ret += '# instead edit `./ci/cbindgen.py` at the root of the repo\n' self.ret += '\n' - self.ret += 'from ctypes import *\n' self.ret += 'import ctypes\n' self.ret += 'from typing import Any\n' self.ret += 'from enum import Enum, auto\n' @@ -39,7 +38,7 @@ def visit_Struct(self, node): self.ret += "\n" if not node.decls: self.forward_declared[node.name] = True - self.ret += "class {}(Structure):\n".format(node.name) + self.ret += "class {}(ctypes.Structure):\n".format(node.name) self.ret += " pass\n" return @@ -55,7 +54,7 @@ def visit_Struct(self, node): if node.name in self.forward_declared: self.ret += "{}._fields_ = [\n".format(node.name) else: - self.ret += "class {}(Structure):\n".format(node.name) + self.ret += "class {}(ctypes.Structure):\n".format(node.name) self.ret += " _fields_ = [\n" for decl in node.decls: @@ -72,7 +71,7 @@ def visit_Union(self, node): assert(node.decls) self.ret += "\n" - self.ret += "class {}(Union):\n".format(node.name) + self.ret += "class {}(ctypes.Union):\n".format(node.name) self.ret += " _fields_ = [\n" for decl in node.decls: self.ret += " (\"{}\", {}),\n".format(name(decl.name), type_name(decl.type)) @@ -184,49 +183,49 @@ def type_name(ty, ptr=False, typing=False): if typing: return "ctypes._Pointer" if isinstance(ty, c_ast.IdentifierType) and ty.names[0] == "void": - return "c_void_p" + return "ctypes.c_void_p" elif not isinstance(ty, c_ast.FuncDecl): - return "POINTER({})".format(type_name(ty, False, typing)) + return "ctypes.POINTER({})".format(type_name(ty, False, typing)) if isinstance(ty, c_ast.IdentifierType): if ty.names == ['unsigned', 'char']: - return "int" if typing else "c_ubyte" + return "int" if typing else "ctypes.c_ubyte" assert(len(ty.names) == 1) if ty.names[0] == "void": return "None" elif ty.names[0] == "_Bool": - return "bool" if typing else "c_bool" + return "bool" if typing else "ctypes.c_bool" elif ty.names[0] == "byte_t": - return "c_ubyte" + return "ctypes.c_ubyte" elif ty.names[0] == "int8_t": - return "c_int8" + return "ctypes.c_int8" elif ty.names[0] == "uint8_t": - return "c_uint8" + return "ctypes.c_uint8" elif ty.names[0] == "int16_t": - return "c_int16" + return "ctypes.c_int16" elif ty.names[0] == "uint16_t": - return "c_uint16" + return "ctypes.c_uint16" elif ty.names[0] == "int32_t": - return "int" if typing else "c_int32" + return "int" if typing else "ctypes.c_int32" elif ty.names[0] == "uint32_t": - return "int" if typing else "c_uint32" + return "int" if typing else "ctypes.c_uint32" elif ty.names[0] == "uint64_t": - return "int" if typing else "c_uint64" + return "int" if typing else "ctypes.c_uint64" elif ty.names[0] == "int64_t": - return "int" if typing else "c_int64" + return "int" if typing else "ctypes.c_int64" elif ty.names[0] == "float32_t": - return "float" if typing else "c_float" + return "float" if typing else "ctypes.c_float" elif ty.names[0] == "float64_t": - return "float" if typing else "c_double" + return "float" if typing else "ctypes.c_double" elif ty.names[0] == "size_t": - return "int" if typing else "c_size_t" + return "int" if typing else "ctypes.c_size_t" elif ty.names[0] == "ptrdiff_t": - return "int" if typing else "c_ssize_t" + return "int" if typing else "ctypes.c_ssize_t" elif ty.names[0] == "char": - return "c_char" + return "ctypes.c_char" elif ty.names[0] == "int": - return "int" if typing else "c_int" + return "int" if typing else "ctypes.c_int" # ctypes values can't stand as typedefs, so just use the pointer type here elif typing and 'callback_t' in ty.names[0]: return "ctypes._Pointer" @@ -244,13 +243,13 @@ def type_name(ty, ptr=False, typing=False): # TODO: apparently errors are thrown if we faithfully represent the # pointer type here, seems odd? if isinstance(ty.type, c_ast.PtrDecl): - tys.append("c_size_t") + tys.append("ctypes.c_size_t") else: tys.append(type_name(ty.type)) if ty.args and ty.args.params: for param in ty.args.params: tys.append(type_name(param.type)) - return "CFUNCTYPE({})".format(', '.join(tys)) + return "ctypes.CFUNCTYPE({})".format(', '.join(tys)) elif isinstance(ty, c_ast.PtrDecl) or isinstance(ty, c_ast.ArrayDecl): return type_name(ty.type, True, typing) else: diff --git a/wasmtime/_bindings.py b/wasmtime/_bindings.py index c7afd6f3..f39f5596 100644 --- a/wasmtime/_bindings.py +++ b/wasmtime/_bindings.py @@ -3,173 +3,172 @@ # This is a procedurally generated file, DO NOT EDIT # instead edit `./ci/cbindgen.py` at the root of the repo -from ctypes import * import ctypes from typing import Any from enum import Enum, auto from ._ffi import dll, wasm_val_t, wasm_ref_t -wasm_byte_t = c_ubyte +wasm_byte_t = ctypes.c_ubyte -class wasm_byte_vec_t(Structure): +class wasm_byte_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(wasm_byte_t)), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(wasm_byte_t)), ] size: int data: ctypes._Pointer _wasm_byte_vec_new_empty = dll.wasm_byte_vec_new_empty _wasm_byte_vec_new_empty.restype = None -_wasm_byte_vec_new_empty.argtypes = [POINTER(wasm_byte_vec_t)] +_wasm_byte_vec_new_empty.argtypes = [ctypes.POINTER(wasm_byte_vec_t)] def wasm_byte_vec_new_empty(out: Any) -> None: return _wasm_byte_vec_new_empty(out) # type: ignore _wasm_byte_vec_new_uninitialized = dll.wasm_byte_vec_new_uninitialized _wasm_byte_vec_new_uninitialized.restype = None -_wasm_byte_vec_new_uninitialized.argtypes = [POINTER(wasm_byte_vec_t), c_size_t] +_wasm_byte_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_byte_vec_t), ctypes.c_size_t] def wasm_byte_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_byte_vec_new_uninitialized(out, arg1) # type: ignore _wasm_byte_vec_new = dll.wasm_byte_vec_new _wasm_byte_vec_new.restype = None -_wasm_byte_vec_new.argtypes = [POINTER(wasm_byte_vec_t), c_size_t, POINTER(wasm_byte_t)] +_wasm_byte_vec_new.argtypes = [ctypes.POINTER(wasm_byte_vec_t), ctypes.c_size_t, ctypes.POINTER(wasm_byte_t)] def wasm_byte_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_byte_vec_new(out, arg1, arg2) # type: ignore _wasm_byte_vec_copy = dll.wasm_byte_vec_copy _wasm_byte_vec_copy.restype = None -_wasm_byte_vec_copy.argtypes = [POINTER(wasm_byte_vec_t), POINTER(wasm_byte_vec_t)] +_wasm_byte_vec_copy.argtypes = [ctypes.POINTER(wasm_byte_vec_t), ctypes.POINTER(wasm_byte_vec_t)] def wasm_byte_vec_copy(out: Any, arg1: Any) -> None: return _wasm_byte_vec_copy(out, arg1) # type: ignore _wasm_byte_vec_delete = dll.wasm_byte_vec_delete _wasm_byte_vec_delete.restype = None -_wasm_byte_vec_delete.argtypes = [POINTER(wasm_byte_vec_t)] +_wasm_byte_vec_delete.argtypes = [ctypes.POINTER(wasm_byte_vec_t)] def wasm_byte_vec_delete(arg0: Any) -> None: return _wasm_byte_vec_delete(arg0) # type: ignore wasm_name_t = wasm_byte_vec_t -class wasm_config_t(Structure): +class wasm_config_t(ctypes.Structure): pass _wasm_config_delete = dll.wasm_config_delete _wasm_config_delete.restype = None -_wasm_config_delete.argtypes = [POINTER(wasm_config_t)] +_wasm_config_delete.argtypes = [ctypes.POINTER(wasm_config_t)] def wasm_config_delete(arg0: Any) -> None: return _wasm_config_delete(arg0) # type: ignore _wasm_config_new = dll.wasm_config_new -_wasm_config_new.restype = POINTER(wasm_config_t) +_wasm_config_new.restype = ctypes.POINTER(wasm_config_t) _wasm_config_new.argtypes = [] def wasm_config_new() -> ctypes._Pointer: return _wasm_config_new() # type: ignore -class wasm_engine_t(Structure): +class wasm_engine_t(ctypes.Structure): pass _wasm_engine_delete = dll.wasm_engine_delete _wasm_engine_delete.restype = None -_wasm_engine_delete.argtypes = [POINTER(wasm_engine_t)] +_wasm_engine_delete.argtypes = [ctypes.POINTER(wasm_engine_t)] def wasm_engine_delete(arg0: Any) -> None: return _wasm_engine_delete(arg0) # type: ignore _wasm_engine_new = dll.wasm_engine_new -_wasm_engine_new.restype = POINTER(wasm_engine_t) +_wasm_engine_new.restype = ctypes.POINTER(wasm_engine_t) _wasm_engine_new.argtypes = [] def wasm_engine_new() -> ctypes._Pointer: return _wasm_engine_new() # type: ignore _wasm_engine_new_with_config = dll.wasm_engine_new_with_config -_wasm_engine_new_with_config.restype = POINTER(wasm_engine_t) -_wasm_engine_new_with_config.argtypes = [POINTER(wasm_config_t)] +_wasm_engine_new_with_config.restype = ctypes.POINTER(wasm_engine_t) +_wasm_engine_new_with_config.argtypes = [ctypes.POINTER(wasm_config_t)] def wasm_engine_new_with_config(arg0: Any) -> ctypes._Pointer: return _wasm_engine_new_with_config(arg0) # type: ignore -class wasm_store_t(Structure): +class wasm_store_t(ctypes.Structure): pass _wasm_store_delete = dll.wasm_store_delete _wasm_store_delete.restype = None -_wasm_store_delete.argtypes = [POINTER(wasm_store_t)] +_wasm_store_delete.argtypes = [ctypes.POINTER(wasm_store_t)] def wasm_store_delete(arg0: Any) -> None: return _wasm_store_delete(arg0) # type: ignore _wasm_store_new = dll.wasm_store_new -_wasm_store_new.restype = POINTER(wasm_store_t) -_wasm_store_new.argtypes = [POINTER(wasm_engine_t)] +_wasm_store_new.restype = ctypes.POINTER(wasm_store_t) +_wasm_store_new.argtypes = [ctypes.POINTER(wasm_engine_t)] def wasm_store_new(arg0: Any) -> ctypes._Pointer: return _wasm_store_new(arg0) # type: ignore -wasm_mutability_t = c_uint8 +wasm_mutability_t = ctypes.c_uint8 class wasm_mutability_enum(Enum): WASM_CONST = auto() WASM_VAR = auto() -class wasm_limits_t(Structure): +class wasm_limits_t(ctypes.Structure): _fields_ = [ - ("min", c_uint32), - ("max", c_uint32), + ("min", ctypes.c_uint32), + ("max", ctypes.c_uint32), ] min: int max: int -class wasm_valtype_t(Structure): +class wasm_valtype_t(ctypes.Structure): pass _wasm_valtype_delete = dll.wasm_valtype_delete _wasm_valtype_delete.restype = None -_wasm_valtype_delete.argtypes = [POINTER(wasm_valtype_t)] +_wasm_valtype_delete.argtypes = [ctypes.POINTER(wasm_valtype_t)] def wasm_valtype_delete(arg0: Any) -> None: return _wasm_valtype_delete(arg0) # type: ignore -class wasm_valtype_vec_t(Structure): +class wasm_valtype_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_valtype_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_valtype_t))), ] size: int data: ctypes._Pointer _wasm_valtype_vec_new_empty = dll.wasm_valtype_vec_new_empty _wasm_valtype_vec_new_empty.restype = None -_wasm_valtype_vec_new_empty.argtypes = [POINTER(wasm_valtype_vec_t)] +_wasm_valtype_vec_new_empty.argtypes = [ctypes.POINTER(wasm_valtype_vec_t)] def wasm_valtype_vec_new_empty(out: Any) -> None: return _wasm_valtype_vec_new_empty(out) # type: ignore _wasm_valtype_vec_new_uninitialized = dll.wasm_valtype_vec_new_uninitialized _wasm_valtype_vec_new_uninitialized.restype = None -_wasm_valtype_vec_new_uninitialized.argtypes = [POINTER(wasm_valtype_vec_t), c_size_t] +_wasm_valtype_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_valtype_vec_t), ctypes.c_size_t] def wasm_valtype_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_valtype_vec_new_uninitialized(out, arg1) # type: ignore _wasm_valtype_vec_new = dll.wasm_valtype_vec_new _wasm_valtype_vec_new.restype = None -_wasm_valtype_vec_new.argtypes = [POINTER(wasm_valtype_vec_t), c_size_t, POINTER(POINTER(wasm_valtype_t))] +_wasm_valtype_vec_new.argtypes = [ctypes.POINTER(wasm_valtype_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_valtype_t))] def wasm_valtype_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_valtype_vec_new(out, arg1, arg2) # type: ignore _wasm_valtype_vec_copy = dll.wasm_valtype_vec_copy _wasm_valtype_vec_copy.restype = None -_wasm_valtype_vec_copy.argtypes = [POINTER(wasm_valtype_vec_t), POINTER(wasm_valtype_vec_t)] +_wasm_valtype_vec_copy.argtypes = [ctypes.POINTER(wasm_valtype_vec_t), ctypes.POINTER(wasm_valtype_vec_t)] def wasm_valtype_vec_copy(out: Any, arg1: Any) -> None: return _wasm_valtype_vec_copy(out, arg1) # type: ignore _wasm_valtype_vec_delete = dll.wasm_valtype_vec_delete _wasm_valtype_vec_delete.restype = None -_wasm_valtype_vec_delete.argtypes = [POINTER(wasm_valtype_vec_t)] +_wasm_valtype_vec_delete.argtypes = [ctypes.POINTER(wasm_valtype_vec_t)] def wasm_valtype_vec_delete(arg0: Any) -> None: return _wasm_valtype_vec_delete(arg0) # type: ignore _wasm_valtype_copy = dll.wasm_valtype_copy -_wasm_valtype_copy.restype = POINTER(wasm_valtype_t) -_wasm_valtype_copy.argtypes = [POINTER(wasm_valtype_t)] +_wasm_valtype_copy.restype = ctypes.POINTER(wasm_valtype_t) +_wasm_valtype_copy.argtypes = [ctypes.POINTER(wasm_valtype_t)] def wasm_valtype_copy(arg0: Any) -> ctypes._Pointer: return _wasm_valtype_copy(arg0) # type: ignore -wasm_valkind_t = c_uint8 +wasm_valkind_t = ctypes.c_uint8 class wasm_valkind_enum(Enum): WASM_I32 = auto() @@ -180,349 +179,349 @@ class wasm_valkind_enum(Enum): WASM_FUNCREF = auto() _wasm_valtype_new = dll.wasm_valtype_new -_wasm_valtype_new.restype = POINTER(wasm_valtype_t) +_wasm_valtype_new.restype = ctypes.POINTER(wasm_valtype_t) _wasm_valtype_new.argtypes = [wasm_valkind_t] def wasm_valtype_new(arg0: Any) -> ctypes._Pointer: return _wasm_valtype_new(arg0) # type: ignore _wasm_valtype_kind = dll.wasm_valtype_kind _wasm_valtype_kind.restype = wasm_valkind_t -_wasm_valtype_kind.argtypes = [POINTER(wasm_valtype_t)] +_wasm_valtype_kind.argtypes = [ctypes.POINTER(wasm_valtype_t)] def wasm_valtype_kind(arg0: Any) -> wasm_valkind_t: return _wasm_valtype_kind(arg0) # type: ignore -class wasm_functype_t(Structure): +class wasm_functype_t(ctypes.Structure): pass _wasm_functype_delete = dll.wasm_functype_delete _wasm_functype_delete.restype = None -_wasm_functype_delete.argtypes = [POINTER(wasm_functype_t)] +_wasm_functype_delete.argtypes = [ctypes.POINTER(wasm_functype_t)] def wasm_functype_delete(arg0: Any) -> None: return _wasm_functype_delete(arg0) # type: ignore -class wasm_functype_vec_t(Structure): +class wasm_functype_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_functype_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_functype_t))), ] size: int data: ctypes._Pointer _wasm_functype_vec_new_empty = dll.wasm_functype_vec_new_empty _wasm_functype_vec_new_empty.restype = None -_wasm_functype_vec_new_empty.argtypes = [POINTER(wasm_functype_vec_t)] +_wasm_functype_vec_new_empty.argtypes = [ctypes.POINTER(wasm_functype_vec_t)] def wasm_functype_vec_new_empty(out: Any) -> None: return _wasm_functype_vec_new_empty(out) # type: ignore _wasm_functype_vec_new_uninitialized = dll.wasm_functype_vec_new_uninitialized _wasm_functype_vec_new_uninitialized.restype = None -_wasm_functype_vec_new_uninitialized.argtypes = [POINTER(wasm_functype_vec_t), c_size_t] +_wasm_functype_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_functype_vec_t), ctypes.c_size_t] def wasm_functype_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_functype_vec_new_uninitialized(out, arg1) # type: ignore _wasm_functype_vec_new = dll.wasm_functype_vec_new _wasm_functype_vec_new.restype = None -_wasm_functype_vec_new.argtypes = [POINTER(wasm_functype_vec_t), c_size_t, POINTER(POINTER(wasm_functype_t))] +_wasm_functype_vec_new.argtypes = [ctypes.POINTER(wasm_functype_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_functype_t))] def wasm_functype_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_functype_vec_new(out, arg1, arg2) # type: ignore _wasm_functype_vec_copy = dll.wasm_functype_vec_copy _wasm_functype_vec_copy.restype = None -_wasm_functype_vec_copy.argtypes = [POINTER(wasm_functype_vec_t), POINTER(wasm_functype_vec_t)] +_wasm_functype_vec_copy.argtypes = [ctypes.POINTER(wasm_functype_vec_t), ctypes.POINTER(wasm_functype_vec_t)] def wasm_functype_vec_copy(out: Any, arg1: Any) -> None: return _wasm_functype_vec_copy(out, arg1) # type: ignore _wasm_functype_vec_delete = dll.wasm_functype_vec_delete _wasm_functype_vec_delete.restype = None -_wasm_functype_vec_delete.argtypes = [POINTER(wasm_functype_vec_t)] +_wasm_functype_vec_delete.argtypes = [ctypes.POINTER(wasm_functype_vec_t)] def wasm_functype_vec_delete(arg0: Any) -> None: return _wasm_functype_vec_delete(arg0) # type: ignore _wasm_functype_copy = dll.wasm_functype_copy -_wasm_functype_copy.restype = POINTER(wasm_functype_t) -_wasm_functype_copy.argtypes = [POINTER(wasm_functype_t)] +_wasm_functype_copy.restype = ctypes.POINTER(wasm_functype_t) +_wasm_functype_copy.argtypes = [ctypes.POINTER(wasm_functype_t)] def wasm_functype_copy(arg0: Any) -> ctypes._Pointer: return _wasm_functype_copy(arg0) # type: ignore _wasm_functype_new = dll.wasm_functype_new -_wasm_functype_new.restype = POINTER(wasm_functype_t) -_wasm_functype_new.argtypes = [POINTER(wasm_valtype_vec_t), POINTER(wasm_valtype_vec_t)] +_wasm_functype_new.restype = ctypes.POINTER(wasm_functype_t) +_wasm_functype_new.argtypes = [ctypes.POINTER(wasm_valtype_vec_t), ctypes.POINTER(wasm_valtype_vec_t)] def wasm_functype_new(params: Any, results: Any) -> ctypes._Pointer: return _wasm_functype_new(params, results) # type: ignore _wasm_functype_params = dll.wasm_functype_params -_wasm_functype_params.restype = POINTER(wasm_valtype_vec_t) -_wasm_functype_params.argtypes = [POINTER(wasm_functype_t)] +_wasm_functype_params.restype = ctypes.POINTER(wasm_valtype_vec_t) +_wasm_functype_params.argtypes = [ctypes.POINTER(wasm_functype_t)] def wasm_functype_params(arg0: Any) -> ctypes._Pointer: return _wasm_functype_params(arg0) # type: ignore _wasm_functype_results = dll.wasm_functype_results -_wasm_functype_results.restype = POINTER(wasm_valtype_vec_t) -_wasm_functype_results.argtypes = [POINTER(wasm_functype_t)] +_wasm_functype_results.restype = ctypes.POINTER(wasm_valtype_vec_t) +_wasm_functype_results.argtypes = [ctypes.POINTER(wasm_functype_t)] def wasm_functype_results(arg0: Any) -> ctypes._Pointer: return _wasm_functype_results(arg0) # type: ignore -class wasm_globaltype_t(Structure): +class wasm_globaltype_t(ctypes.Structure): pass _wasm_globaltype_delete = dll.wasm_globaltype_delete _wasm_globaltype_delete.restype = None -_wasm_globaltype_delete.argtypes = [POINTER(wasm_globaltype_t)] +_wasm_globaltype_delete.argtypes = [ctypes.POINTER(wasm_globaltype_t)] def wasm_globaltype_delete(arg0: Any) -> None: return _wasm_globaltype_delete(arg0) # type: ignore -class wasm_globaltype_vec_t(Structure): +class wasm_globaltype_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_globaltype_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_globaltype_t))), ] size: int data: ctypes._Pointer _wasm_globaltype_vec_new_empty = dll.wasm_globaltype_vec_new_empty _wasm_globaltype_vec_new_empty.restype = None -_wasm_globaltype_vec_new_empty.argtypes = [POINTER(wasm_globaltype_vec_t)] +_wasm_globaltype_vec_new_empty.argtypes = [ctypes.POINTER(wasm_globaltype_vec_t)] def wasm_globaltype_vec_new_empty(out: Any) -> None: return _wasm_globaltype_vec_new_empty(out) # type: ignore _wasm_globaltype_vec_new_uninitialized = dll.wasm_globaltype_vec_new_uninitialized _wasm_globaltype_vec_new_uninitialized.restype = None -_wasm_globaltype_vec_new_uninitialized.argtypes = [POINTER(wasm_globaltype_vec_t), c_size_t] +_wasm_globaltype_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_globaltype_vec_t), ctypes.c_size_t] def wasm_globaltype_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_globaltype_vec_new_uninitialized(out, arg1) # type: ignore _wasm_globaltype_vec_new = dll.wasm_globaltype_vec_new _wasm_globaltype_vec_new.restype = None -_wasm_globaltype_vec_new.argtypes = [POINTER(wasm_globaltype_vec_t), c_size_t, POINTER(POINTER(wasm_globaltype_t))] +_wasm_globaltype_vec_new.argtypes = [ctypes.POINTER(wasm_globaltype_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_globaltype_t))] def wasm_globaltype_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_globaltype_vec_new(out, arg1, arg2) # type: ignore _wasm_globaltype_vec_copy = dll.wasm_globaltype_vec_copy _wasm_globaltype_vec_copy.restype = None -_wasm_globaltype_vec_copy.argtypes = [POINTER(wasm_globaltype_vec_t), POINTER(wasm_globaltype_vec_t)] +_wasm_globaltype_vec_copy.argtypes = [ctypes.POINTER(wasm_globaltype_vec_t), ctypes.POINTER(wasm_globaltype_vec_t)] def wasm_globaltype_vec_copy(out: Any, arg1: Any) -> None: return _wasm_globaltype_vec_copy(out, arg1) # type: ignore _wasm_globaltype_vec_delete = dll.wasm_globaltype_vec_delete _wasm_globaltype_vec_delete.restype = None -_wasm_globaltype_vec_delete.argtypes = [POINTER(wasm_globaltype_vec_t)] +_wasm_globaltype_vec_delete.argtypes = [ctypes.POINTER(wasm_globaltype_vec_t)] def wasm_globaltype_vec_delete(arg0: Any) -> None: return _wasm_globaltype_vec_delete(arg0) # type: ignore _wasm_globaltype_copy = dll.wasm_globaltype_copy -_wasm_globaltype_copy.restype = POINTER(wasm_globaltype_t) -_wasm_globaltype_copy.argtypes = [POINTER(wasm_globaltype_t)] +_wasm_globaltype_copy.restype = ctypes.POINTER(wasm_globaltype_t) +_wasm_globaltype_copy.argtypes = [ctypes.POINTER(wasm_globaltype_t)] def wasm_globaltype_copy(arg0: Any) -> ctypes._Pointer: return _wasm_globaltype_copy(arg0) # type: ignore _wasm_globaltype_new = dll.wasm_globaltype_new -_wasm_globaltype_new.restype = POINTER(wasm_globaltype_t) -_wasm_globaltype_new.argtypes = [POINTER(wasm_valtype_t), wasm_mutability_t] +_wasm_globaltype_new.restype = ctypes.POINTER(wasm_globaltype_t) +_wasm_globaltype_new.argtypes = [ctypes.POINTER(wasm_valtype_t), wasm_mutability_t] def wasm_globaltype_new(arg0: Any, arg1: Any) -> ctypes._Pointer: return _wasm_globaltype_new(arg0, arg1) # type: ignore _wasm_globaltype_content = dll.wasm_globaltype_content -_wasm_globaltype_content.restype = POINTER(wasm_valtype_t) -_wasm_globaltype_content.argtypes = [POINTER(wasm_globaltype_t)] +_wasm_globaltype_content.restype = ctypes.POINTER(wasm_valtype_t) +_wasm_globaltype_content.argtypes = [ctypes.POINTER(wasm_globaltype_t)] def wasm_globaltype_content(arg0: Any) -> ctypes._Pointer: return _wasm_globaltype_content(arg0) # type: ignore _wasm_globaltype_mutability = dll.wasm_globaltype_mutability _wasm_globaltype_mutability.restype = wasm_mutability_t -_wasm_globaltype_mutability.argtypes = [POINTER(wasm_globaltype_t)] +_wasm_globaltype_mutability.argtypes = [ctypes.POINTER(wasm_globaltype_t)] def wasm_globaltype_mutability(arg0: Any) -> wasm_mutability_t: return _wasm_globaltype_mutability(arg0) # type: ignore -class wasm_tabletype_t(Structure): +class wasm_tabletype_t(ctypes.Structure): pass _wasm_tabletype_delete = dll.wasm_tabletype_delete _wasm_tabletype_delete.restype = None -_wasm_tabletype_delete.argtypes = [POINTER(wasm_tabletype_t)] +_wasm_tabletype_delete.argtypes = [ctypes.POINTER(wasm_tabletype_t)] def wasm_tabletype_delete(arg0: Any) -> None: return _wasm_tabletype_delete(arg0) # type: ignore -class wasm_tabletype_vec_t(Structure): +class wasm_tabletype_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_tabletype_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_tabletype_t))), ] size: int data: ctypes._Pointer _wasm_tabletype_vec_new_empty = dll.wasm_tabletype_vec_new_empty _wasm_tabletype_vec_new_empty.restype = None -_wasm_tabletype_vec_new_empty.argtypes = [POINTER(wasm_tabletype_vec_t)] +_wasm_tabletype_vec_new_empty.argtypes = [ctypes.POINTER(wasm_tabletype_vec_t)] def wasm_tabletype_vec_new_empty(out: Any) -> None: return _wasm_tabletype_vec_new_empty(out) # type: ignore _wasm_tabletype_vec_new_uninitialized = dll.wasm_tabletype_vec_new_uninitialized _wasm_tabletype_vec_new_uninitialized.restype = None -_wasm_tabletype_vec_new_uninitialized.argtypes = [POINTER(wasm_tabletype_vec_t), c_size_t] +_wasm_tabletype_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_tabletype_vec_t), ctypes.c_size_t] def wasm_tabletype_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_tabletype_vec_new_uninitialized(out, arg1) # type: ignore _wasm_tabletype_vec_new = dll.wasm_tabletype_vec_new _wasm_tabletype_vec_new.restype = None -_wasm_tabletype_vec_new.argtypes = [POINTER(wasm_tabletype_vec_t), c_size_t, POINTER(POINTER(wasm_tabletype_t))] +_wasm_tabletype_vec_new.argtypes = [ctypes.POINTER(wasm_tabletype_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_tabletype_t))] def wasm_tabletype_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_tabletype_vec_new(out, arg1, arg2) # type: ignore _wasm_tabletype_vec_copy = dll.wasm_tabletype_vec_copy _wasm_tabletype_vec_copy.restype = None -_wasm_tabletype_vec_copy.argtypes = [POINTER(wasm_tabletype_vec_t), POINTER(wasm_tabletype_vec_t)] +_wasm_tabletype_vec_copy.argtypes = [ctypes.POINTER(wasm_tabletype_vec_t), ctypes.POINTER(wasm_tabletype_vec_t)] def wasm_tabletype_vec_copy(out: Any, arg1: Any) -> None: return _wasm_tabletype_vec_copy(out, arg1) # type: ignore _wasm_tabletype_vec_delete = dll.wasm_tabletype_vec_delete _wasm_tabletype_vec_delete.restype = None -_wasm_tabletype_vec_delete.argtypes = [POINTER(wasm_tabletype_vec_t)] +_wasm_tabletype_vec_delete.argtypes = [ctypes.POINTER(wasm_tabletype_vec_t)] def wasm_tabletype_vec_delete(arg0: Any) -> None: return _wasm_tabletype_vec_delete(arg0) # type: ignore _wasm_tabletype_copy = dll.wasm_tabletype_copy -_wasm_tabletype_copy.restype = POINTER(wasm_tabletype_t) -_wasm_tabletype_copy.argtypes = [POINTER(wasm_tabletype_t)] +_wasm_tabletype_copy.restype = ctypes.POINTER(wasm_tabletype_t) +_wasm_tabletype_copy.argtypes = [ctypes.POINTER(wasm_tabletype_t)] def wasm_tabletype_copy(arg0: Any) -> ctypes._Pointer: return _wasm_tabletype_copy(arg0) # type: ignore _wasm_tabletype_new = dll.wasm_tabletype_new -_wasm_tabletype_new.restype = POINTER(wasm_tabletype_t) -_wasm_tabletype_new.argtypes = [POINTER(wasm_valtype_t), POINTER(wasm_limits_t)] +_wasm_tabletype_new.restype = ctypes.POINTER(wasm_tabletype_t) +_wasm_tabletype_new.argtypes = [ctypes.POINTER(wasm_valtype_t), ctypes.POINTER(wasm_limits_t)] def wasm_tabletype_new(arg0: Any, arg1: Any) -> ctypes._Pointer: return _wasm_tabletype_new(arg0, arg1) # type: ignore _wasm_tabletype_element = dll.wasm_tabletype_element -_wasm_tabletype_element.restype = POINTER(wasm_valtype_t) -_wasm_tabletype_element.argtypes = [POINTER(wasm_tabletype_t)] +_wasm_tabletype_element.restype = ctypes.POINTER(wasm_valtype_t) +_wasm_tabletype_element.argtypes = [ctypes.POINTER(wasm_tabletype_t)] def wasm_tabletype_element(arg0: Any) -> ctypes._Pointer: return _wasm_tabletype_element(arg0) # type: ignore _wasm_tabletype_limits = dll.wasm_tabletype_limits -_wasm_tabletype_limits.restype = POINTER(wasm_limits_t) -_wasm_tabletype_limits.argtypes = [POINTER(wasm_tabletype_t)] +_wasm_tabletype_limits.restype = ctypes.POINTER(wasm_limits_t) +_wasm_tabletype_limits.argtypes = [ctypes.POINTER(wasm_tabletype_t)] def wasm_tabletype_limits(arg0: Any) -> ctypes._Pointer: return _wasm_tabletype_limits(arg0) # type: ignore -class wasm_memorytype_t(Structure): +class wasm_memorytype_t(ctypes.Structure): pass _wasm_memorytype_delete = dll.wasm_memorytype_delete _wasm_memorytype_delete.restype = None -_wasm_memorytype_delete.argtypes = [POINTER(wasm_memorytype_t)] +_wasm_memorytype_delete.argtypes = [ctypes.POINTER(wasm_memorytype_t)] def wasm_memorytype_delete(arg0: Any) -> None: return _wasm_memorytype_delete(arg0) # type: ignore -class wasm_memorytype_vec_t(Structure): +class wasm_memorytype_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_memorytype_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_memorytype_t))), ] size: int data: ctypes._Pointer _wasm_memorytype_vec_new_empty = dll.wasm_memorytype_vec_new_empty _wasm_memorytype_vec_new_empty.restype = None -_wasm_memorytype_vec_new_empty.argtypes = [POINTER(wasm_memorytype_vec_t)] +_wasm_memorytype_vec_new_empty.argtypes = [ctypes.POINTER(wasm_memorytype_vec_t)] def wasm_memorytype_vec_new_empty(out: Any) -> None: return _wasm_memorytype_vec_new_empty(out) # type: ignore _wasm_memorytype_vec_new_uninitialized = dll.wasm_memorytype_vec_new_uninitialized _wasm_memorytype_vec_new_uninitialized.restype = None -_wasm_memorytype_vec_new_uninitialized.argtypes = [POINTER(wasm_memorytype_vec_t), c_size_t] +_wasm_memorytype_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_memorytype_vec_t), ctypes.c_size_t] def wasm_memorytype_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_memorytype_vec_new_uninitialized(out, arg1) # type: ignore _wasm_memorytype_vec_new = dll.wasm_memorytype_vec_new _wasm_memorytype_vec_new.restype = None -_wasm_memorytype_vec_new.argtypes = [POINTER(wasm_memorytype_vec_t), c_size_t, POINTER(POINTER(wasm_memorytype_t))] +_wasm_memorytype_vec_new.argtypes = [ctypes.POINTER(wasm_memorytype_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_memorytype_t))] def wasm_memorytype_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_memorytype_vec_new(out, arg1, arg2) # type: ignore _wasm_memorytype_vec_copy = dll.wasm_memorytype_vec_copy _wasm_memorytype_vec_copy.restype = None -_wasm_memorytype_vec_copy.argtypes = [POINTER(wasm_memorytype_vec_t), POINTER(wasm_memorytype_vec_t)] +_wasm_memorytype_vec_copy.argtypes = [ctypes.POINTER(wasm_memorytype_vec_t), ctypes.POINTER(wasm_memorytype_vec_t)] def wasm_memorytype_vec_copy(out: Any, arg1: Any) -> None: return _wasm_memorytype_vec_copy(out, arg1) # type: ignore _wasm_memorytype_vec_delete = dll.wasm_memorytype_vec_delete _wasm_memorytype_vec_delete.restype = None -_wasm_memorytype_vec_delete.argtypes = [POINTER(wasm_memorytype_vec_t)] +_wasm_memorytype_vec_delete.argtypes = [ctypes.POINTER(wasm_memorytype_vec_t)] def wasm_memorytype_vec_delete(arg0: Any) -> None: return _wasm_memorytype_vec_delete(arg0) # type: ignore _wasm_memorytype_copy = dll.wasm_memorytype_copy -_wasm_memorytype_copy.restype = POINTER(wasm_memorytype_t) -_wasm_memorytype_copy.argtypes = [POINTER(wasm_memorytype_t)] +_wasm_memorytype_copy.restype = ctypes.POINTER(wasm_memorytype_t) +_wasm_memorytype_copy.argtypes = [ctypes.POINTER(wasm_memorytype_t)] def wasm_memorytype_copy(arg0: Any) -> ctypes._Pointer: return _wasm_memorytype_copy(arg0) # type: ignore _wasm_memorytype_new = dll.wasm_memorytype_new -_wasm_memorytype_new.restype = POINTER(wasm_memorytype_t) -_wasm_memorytype_new.argtypes = [POINTER(wasm_limits_t)] +_wasm_memorytype_new.restype = ctypes.POINTER(wasm_memorytype_t) +_wasm_memorytype_new.argtypes = [ctypes.POINTER(wasm_limits_t)] def wasm_memorytype_new(arg0: Any) -> ctypes._Pointer: return _wasm_memorytype_new(arg0) # type: ignore _wasm_memorytype_limits = dll.wasm_memorytype_limits -_wasm_memorytype_limits.restype = POINTER(wasm_limits_t) -_wasm_memorytype_limits.argtypes = [POINTER(wasm_memorytype_t)] +_wasm_memorytype_limits.restype = ctypes.POINTER(wasm_limits_t) +_wasm_memorytype_limits.argtypes = [ctypes.POINTER(wasm_memorytype_t)] def wasm_memorytype_limits(arg0: Any) -> ctypes._Pointer: return _wasm_memorytype_limits(arg0) # type: ignore -class wasm_externtype_t(Structure): +class wasm_externtype_t(ctypes.Structure): pass _wasm_externtype_delete = dll.wasm_externtype_delete _wasm_externtype_delete.restype = None -_wasm_externtype_delete.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_delete.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_delete(arg0: Any) -> None: return _wasm_externtype_delete(arg0) # type: ignore -class wasm_externtype_vec_t(Structure): +class wasm_externtype_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_externtype_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_externtype_t))), ] size: int data: ctypes._Pointer _wasm_externtype_vec_new_empty = dll.wasm_externtype_vec_new_empty _wasm_externtype_vec_new_empty.restype = None -_wasm_externtype_vec_new_empty.argtypes = [POINTER(wasm_externtype_vec_t)] +_wasm_externtype_vec_new_empty.argtypes = [ctypes.POINTER(wasm_externtype_vec_t)] def wasm_externtype_vec_new_empty(out: Any) -> None: return _wasm_externtype_vec_new_empty(out) # type: ignore _wasm_externtype_vec_new_uninitialized = dll.wasm_externtype_vec_new_uninitialized _wasm_externtype_vec_new_uninitialized.restype = None -_wasm_externtype_vec_new_uninitialized.argtypes = [POINTER(wasm_externtype_vec_t), c_size_t] +_wasm_externtype_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_externtype_vec_t), ctypes.c_size_t] def wasm_externtype_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_externtype_vec_new_uninitialized(out, arg1) # type: ignore _wasm_externtype_vec_new = dll.wasm_externtype_vec_new _wasm_externtype_vec_new.restype = None -_wasm_externtype_vec_new.argtypes = [POINTER(wasm_externtype_vec_t), c_size_t, POINTER(POINTER(wasm_externtype_t))] +_wasm_externtype_vec_new.argtypes = [ctypes.POINTER(wasm_externtype_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_externtype_t))] def wasm_externtype_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_externtype_vec_new(out, arg1, arg2) # type: ignore _wasm_externtype_vec_copy = dll.wasm_externtype_vec_copy _wasm_externtype_vec_copy.restype = None -_wasm_externtype_vec_copy.argtypes = [POINTER(wasm_externtype_vec_t), POINTER(wasm_externtype_vec_t)] +_wasm_externtype_vec_copy.argtypes = [ctypes.POINTER(wasm_externtype_vec_t), ctypes.POINTER(wasm_externtype_vec_t)] def wasm_externtype_vec_copy(out: Any, arg1: Any) -> None: return _wasm_externtype_vec_copy(out, arg1) # type: ignore _wasm_externtype_vec_delete = dll.wasm_externtype_vec_delete _wasm_externtype_vec_delete.restype = None -_wasm_externtype_vec_delete.argtypes = [POINTER(wasm_externtype_vec_t)] +_wasm_externtype_vec_delete.argtypes = [ctypes.POINTER(wasm_externtype_vec_t)] def wasm_externtype_vec_delete(arg0: Any) -> None: return _wasm_externtype_vec_delete(arg0) # type: ignore _wasm_externtype_copy = dll.wasm_externtype_copy -_wasm_externtype_copy.restype = POINTER(wasm_externtype_t) -_wasm_externtype_copy.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_copy.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_externtype_copy.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_copy(arg0: Any) -> ctypes._Pointer: return _wasm_externtype_copy(arg0) # type: ignore -wasm_externkind_t = c_uint8 +wasm_externkind_t = ctypes.c_uint8 class wasm_externkind_enum(Enum): WASM_EXTERN_FUNC = auto() @@ -532,1455 +531,1455 @@ class wasm_externkind_enum(Enum): _wasm_externtype_kind = dll.wasm_externtype_kind _wasm_externtype_kind.restype = wasm_externkind_t -_wasm_externtype_kind.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_kind.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_kind(arg0: Any) -> wasm_externkind_t: return _wasm_externtype_kind(arg0) # type: ignore _wasm_functype_as_externtype = dll.wasm_functype_as_externtype -_wasm_functype_as_externtype.restype = POINTER(wasm_externtype_t) -_wasm_functype_as_externtype.argtypes = [POINTER(wasm_functype_t)] +_wasm_functype_as_externtype.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_functype_as_externtype.argtypes = [ctypes.POINTER(wasm_functype_t)] def wasm_functype_as_externtype(arg0: Any) -> ctypes._Pointer: return _wasm_functype_as_externtype(arg0) # type: ignore _wasm_globaltype_as_externtype = dll.wasm_globaltype_as_externtype -_wasm_globaltype_as_externtype.restype = POINTER(wasm_externtype_t) -_wasm_globaltype_as_externtype.argtypes = [POINTER(wasm_globaltype_t)] +_wasm_globaltype_as_externtype.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_globaltype_as_externtype.argtypes = [ctypes.POINTER(wasm_globaltype_t)] def wasm_globaltype_as_externtype(arg0: Any) -> ctypes._Pointer: return _wasm_globaltype_as_externtype(arg0) # type: ignore _wasm_tabletype_as_externtype = dll.wasm_tabletype_as_externtype -_wasm_tabletype_as_externtype.restype = POINTER(wasm_externtype_t) -_wasm_tabletype_as_externtype.argtypes = [POINTER(wasm_tabletype_t)] +_wasm_tabletype_as_externtype.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_tabletype_as_externtype.argtypes = [ctypes.POINTER(wasm_tabletype_t)] def wasm_tabletype_as_externtype(arg0: Any) -> ctypes._Pointer: return _wasm_tabletype_as_externtype(arg0) # type: ignore _wasm_memorytype_as_externtype = dll.wasm_memorytype_as_externtype -_wasm_memorytype_as_externtype.restype = POINTER(wasm_externtype_t) -_wasm_memorytype_as_externtype.argtypes = [POINTER(wasm_memorytype_t)] +_wasm_memorytype_as_externtype.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_memorytype_as_externtype.argtypes = [ctypes.POINTER(wasm_memorytype_t)] def wasm_memorytype_as_externtype(arg0: Any) -> ctypes._Pointer: return _wasm_memorytype_as_externtype(arg0) # type: ignore _wasm_externtype_as_functype = dll.wasm_externtype_as_functype -_wasm_externtype_as_functype.restype = POINTER(wasm_functype_t) -_wasm_externtype_as_functype.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_as_functype.restype = ctypes.POINTER(wasm_functype_t) +_wasm_externtype_as_functype.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_as_functype(arg0: Any) -> ctypes._Pointer: return _wasm_externtype_as_functype(arg0) # type: ignore _wasm_externtype_as_globaltype = dll.wasm_externtype_as_globaltype -_wasm_externtype_as_globaltype.restype = POINTER(wasm_globaltype_t) -_wasm_externtype_as_globaltype.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_as_globaltype.restype = ctypes.POINTER(wasm_globaltype_t) +_wasm_externtype_as_globaltype.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_as_globaltype(arg0: Any) -> ctypes._Pointer: return _wasm_externtype_as_globaltype(arg0) # type: ignore _wasm_externtype_as_tabletype = dll.wasm_externtype_as_tabletype -_wasm_externtype_as_tabletype.restype = POINTER(wasm_tabletype_t) -_wasm_externtype_as_tabletype.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_as_tabletype.restype = ctypes.POINTER(wasm_tabletype_t) +_wasm_externtype_as_tabletype.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_as_tabletype(arg0: Any) -> ctypes._Pointer: return _wasm_externtype_as_tabletype(arg0) # type: ignore _wasm_externtype_as_memorytype = dll.wasm_externtype_as_memorytype -_wasm_externtype_as_memorytype.restype = POINTER(wasm_memorytype_t) -_wasm_externtype_as_memorytype.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_as_memorytype.restype = ctypes.POINTER(wasm_memorytype_t) +_wasm_externtype_as_memorytype.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_as_memorytype(arg0: Any) -> ctypes._Pointer: return _wasm_externtype_as_memorytype(arg0) # type: ignore _wasm_functype_as_externtype_const = dll.wasm_functype_as_externtype_const -_wasm_functype_as_externtype_const.restype = POINTER(wasm_externtype_t) -_wasm_functype_as_externtype_const.argtypes = [POINTER(wasm_functype_t)] +_wasm_functype_as_externtype_const.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_functype_as_externtype_const.argtypes = [ctypes.POINTER(wasm_functype_t)] def wasm_functype_as_externtype_const(arg0: Any) -> ctypes._Pointer: return _wasm_functype_as_externtype_const(arg0) # type: ignore _wasm_globaltype_as_externtype_const = dll.wasm_globaltype_as_externtype_const -_wasm_globaltype_as_externtype_const.restype = POINTER(wasm_externtype_t) -_wasm_globaltype_as_externtype_const.argtypes = [POINTER(wasm_globaltype_t)] +_wasm_globaltype_as_externtype_const.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_globaltype_as_externtype_const.argtypes = [ctypes.POINTER(wasm_globaltype_t)] def wasm_globaltype_as_externtype_const(arg0: Any) -> ctypes._Pointer: return _wasm_globaltype_as_externtype_const(arg0) # type: ignore _wasm_tabletype_as_externtype_const = dll.wasm_tabletype_as_externtype_const -_wasm_tabletype_as_externtype_const.restype = POINTER(wasm_externtype_t) -_wasm_tabletype_as_externtype_const.argtypes = [POINTER(wasm_tabletype_t)] +_wasm_tabletype_as_externtype_const.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_tabletype_as_externtype_const.argtypes = [ctypes.POINTER(wasm_tabletype_t)] def wasm_tabletype_as_externtype_const(arg0: Any) -> ctypes._Pointer: return _wasm_tabletype_as_externtype_const(arg0) # type: ignore _wasm_memorytype_as_externtype_const = dll.wasm_memorytype_as_externtype_const -_wasm_memorytype_as_externtype_const.restype = POINTER(wasm_externtype_t) -_wasm_memorytype_as_externtype_const.argtypes = [POINTER(wasm_memorytype_t)] +_wasm_memorytype_as_externtype_const.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_memorytype_as_externtype_const.argtypes = [ctypes.POINTER(wasm_memorytype_t)] def wasm_memorytype_as_externtype_const(arg0: Any) -> ctypes._Pointer: return _wasm_memorytype_as_externtype_const(arg0) # type: ignore _wasm_externtype_as_functype_const = dll.wasm_externtype_as_functype_const -_wasm_externtype_as_functype_const.restype = POINTER(wasm_functype_t) -_wasm_externtype_as_functype_const.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_as_functype_const.restype = ctypes.POINTER(wasm_functype_t) +_wasm_externtype_as_functype_const.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_as_functype_const(arg0: Any) -> ctypes._Pointer: return _wasm_externtype_as_functype_const(arg0) # type: ignore _wasm_externtype_as_globaltype_const = dll.wasm_externtype_as_globaltype_const -_wasm_externtype_as_globaltype_const.restype = POINTER(wasm_globaltype_t) -_wasm_externtype_as_globaltype_const.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_as_globaltype_const.restype = ctypes.POINTER(wasm_globaltype_t) +_wasm_externtype_as_globaltype_const.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_as_globaltype_const(arg0: Any) -> ctypes._Pointer: return _wasm_externtype_as_globaltype_const(arg0) # type: ignore _wasm_externtype_as_tabletype_const = dll.wasm_externtype_as_tabletype_const -_wasm_externtype_as_tabletype_const.restype = POINTER(wasm_tabletype_t) -_wasm_externtype_as_tabletype_const.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_as_tabletype_const.restype = ctypes.POINTER(wasm_tabletype_t) +_wasm_externtype_as_tabletype_const.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_as_tabletype_const(arg0: Any) -> ctypes._Pointer: return _wasm_externtype_as_tabletype_const(arg0) # type: ignore _wasm_externtype_as_memorytype_const = dll.wasm_externtype_as_memorytype_const -_wasm_externtype_as_memorytype_const.restype = POINTER(wasm_memorytype_t) -_wasm_externtype_as_memorytype_const.argtypes = [POINTER(wasm_externtype_t)] +_wasm_externtype_as_memorytype_const.restype = ctypes.POINTER(wasm_memorytype_t) +_wasm_externtype_as_memorytype_const.argtypes = [ctypes.POINTER(wasm_externtype_t)] def wasm_externtype_as_memorytype_const(arg0: Any) -> ctypes._Pointer: return _wasm_externtype_as_memorytype_const(arg0) # type: ignore -class wasm_importtype_t(Structure): +class wasm_importtype_t(ctypes.Structure): pass _wasm_importtype_delete = dll.wasm_importtype_delete _wasm_importtype_delete.restype = None -_wasm_importtype_delete.argtypes = [POINTER(wasm_importtype_t)] +_wasm_importtype_delete.argtypes = [ctypes.POINTER(wasm_importtype_t)] def wasm_importtype_delete(arg0: Any) -> None: return _wasm_importtype_delete(arg0) # type: ignore -class wasm_importtype_vec_t(Structure): +class wasm_importtype_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_importtype_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_importtype_t))), ] size: int data: ctypes._Pointer _wasm_importtype_vec_new_empty = dll.wasm_importtype_vec_new_empty _wasm_importtype_vec_new_empty.restype = None -_wasm_importtype_vec_new_empty.argtypes = [POINTER(wasm_importtype_vec_t)] +_wasm_importtype_vec_new_empty.argtypes = [ctypes.POINTER(wasm_importtype_vec_t)] def wasm_importtype_vec_new_empty(out: Any) -> None: return _wasm_importtype_vec_new_empty(out) # type: ignore _wasm_importtype_vec_new_uninitialized = dll.wasm_importtype_vec_new_uninitialized _wasm_importtype_vec_new_uninitialized.restype = None -_wasm_importtype_vec_new_uninitialized.argtypes = [POINTER(wasm_importtype_vec_t), c_size_t] +_wasm_importtype_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_importtype_vec_t), ctypes.c_size_t] def wasm_importtype_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_importtype_vec_new_uninitialized(out, arg1) # type: ignore _wasm_importtype_vec_new = dll.wasm_importtype_vec_new _wasm_importtype_vec_new.restype = None -_wasm_importtype_vec_new.argtypes = [POINTER(wasm_importtype_vec_t), c_size_t, POINTER(POINTER(wasm_importtype_t))] +_wasm_importtype_vec_new.argtypes = [ctypes.POINTER(wasm_importtype_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_importtype_t))] def wasm_importtype_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_importtype_vec_new(out, arg1, arg2) # type: ignore _wasm_importtype_vec_copy = dll.wasm_importtype_vec_copy _wasm_importtype_vec_copy.restype = None -_wasm_importtype_vec_copy.argtypes = [POINTER(wasm_importtype_vec_t), POINTER(wasm_importtype_vec_t)] +_wasm_importtype_vec_copy.argtypes = [ctypes.POINTER(wasm_importtype_vec_t), ctypes.POINTER(wasm_importtype_vec_t)] def wasm_importtype_vec_copy(out: Any, arg1: Any) -> None: return _wasm_importtype_vec_copy(out, arg1) # type: ignore _wasm_importtype_vec_delete = dll.wasm_importtype_vec_delete _wasm_importtype_vec_delete.restype = None -_wasm_importtype_vec_delete.argtypes = [POINTER(wasm_importtype_vec_t)] +_wasm_importtype_vec_delete.argtypes = [ctypes.POINTER(wasm_importtype_vec_t)] def wasm_importtype_vec_delete(arg0: Any) -> None: return _wasm_importtype_vec_delete(arg0) # type: ignore _wasm_importtype_copy = dll.wasm_importtype_copy -_wasm_importtype_copy.restype = POINTER(wasm_importtype_t) -_wasm_importtype_copy.argtypes = [POINTER(wasm_importtype_t)] +_wasm_importtype_copy.restype = ctypes.POINTER(wasm_importtype_t) +_wasm_importtype_copy.argtypes = [ctypes.POINTER(wasm_importtype_t)] def wasm_importtype_copy(arg0: Any) -> ctypes._Pointer: return _wasm_importtype_copy(arg0) # type: ignore _wasm_importtype_new = dll.wasm_importtype_new -_wasm_importtype_new.restype = POINTER(wasm_importtype_t) -_wasm_importtype_new.argtypes = [POINTER(wasm_name_t), POINTER(wasm_name_t), POINTER(wasm_externtype_t)] +_wasm_importtype_new.restype = ctypes.POINTER(wasm_importtype_t) +_wasm_importtype_new.argtypes = [ctypes.POINTER(wasm_name_t), ctypes.POINTER(wasm_name_t), ctypes.POINTER(wasm_externtype_t)] def wasm_importtype_new(module: Any, name: Any, arg2: Any) -> ctypes._Pointer: return _wasm_importtype_new(module, name, arg2) # type: ignore _wasm_importtype_module = dll.wasm_importtype_module -_wasm_importtype_module.restype = POINTER(wasm_name_t) -_wasm_importtype_module.argtypes = [POINTER(wasm_importtype_t)] +_wasm_importtype_module.restype = ctypes.POINTER(wasm_name_t) +_wasm_importtype_module.argtypes = [ctypes.POINTER(wasm_importtype_t)] def wasm_importtype_module(arg0: Any) -> ctypes._Pointer: return _wasm_importtype_module(arg0) # type: ignore _wasm_importtype_name = dll.wasm_importtype_name -_wasm_importtype_name.restype = POINTER(wasm_name_t) -_wasm_importtype_name.argtypes = [POINTER(wasm_importtype_t)] +_wasm_importtype_name.restype = ctypes.POINTER(wasm_name_t) +_wasm_importtype_name.argtypes = [ctypes.POINTER(wasm_importtype_t)] def wasm_importtype_name(arg0: Any) -> ctypes._Pointer: return _wasm_importtype_name(arg0) # type: ignore _wasm_importtype_type = dll.wasm_importtype_type -_wasm_importtype_type.restype = POINTER(wasm_externtype_t) -_wasm_importtype_type.argtypes = [POINTER(wasm_importtype_t)] +_wasm_importtype_type.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_importtype_type.argtypes = [ctypes.POINTER(wasm_importtype_t)] def wasm_importtype_type(arg0: Any) -> ctypes._Pointer: return _wasm_importtype_type(arg0) # type: ignore -class wasm_exporttype_t(Structure): +class wasm_exporttype_t(ctypes.Structure): pass _wasm_exporttype_delete = dll.wasm_exporttype_delete _wasm_exporttype_delete.restype = None -_wasm_exporttype_delete.argtypes = [POINTER(wasm_exporttype_t)] +_wasm_exporttype_delete.argtypes = [ctypes.POINTER(wasm_exporttype_t)] def wasm_exporttype_delete(arg0: Any) -> None: return _wasm_exporttype_delete(arg0) # type: ignore -class wasm_exporttype_vec_t(Structure): +class wasm_exporttype_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_exporttype_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_exporttype_t))), ] size: int data: ctypes._Pointer _wasm_exporttype_vec_new_empty = dll.wasm_exporttype_vec_new_empty _wasm_exporttype_vec_new_empty.restype = None -_wasm_exporttype_vec_new_empty.argtypes = [POINTER(wasm_exporttype_vec_t)] +_wasm_exporttype_vec_new_empty.argtypes = [ctypes.POINTER(wasm_exporttype_vec_t)] def wasm_exporttype_vec_new_empty(out: Any) -> None: return _wasm_exporttype_vec_new_empty(out) # type: ignore _wasm_exporttype_vec_new_uninitialized = dll.wasm_exporttype_vec_new_uninitialized _wasm_exporttype_vec_new_uninitialized.restype = None -_wasm_exporttype_vec_new_uninitialized.argtypes = [POINTER(wasm_exporttype_vec_t), c_size_t] +_wasm_exporttype_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_exporttype_vec_t), ctypes.c_size_t] def wasm_exporttype_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_exporttype_vec_new_uninitialized(out, arg1) # type: ignore _wasm_exporttype_vec_new = dll.wasm_exporttype_vec_new _wasm_exporttype_vec_new.restype = None -_wasm_exporttype_vec_new.argtypes = [POINTER(wasm_exporttype_vec_t), c_size_t, POINTER(POINTER(wasm_exporttype_t))] +_wasm_exporttype_vec_new.argtypes = [ctypes.POINTER(wasm_exporttype_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_exporttype_t))] def wasm_exporttype_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_exporttype_vec_new(out, arg1, arg2) # type: ignore _wasm_exporttype_vec_copy = dll.wasm_exporttype_vec_copy _wasm_exporttype_vec_copy.restype = None -_wasm_exporttype_vec_copy.argtypes = [POINTER(wasm_exporttype_vec_t), POINTER(wasm_exporttype_vec_t)] +_wasm_exporttype_vec_copy.argtypes = [ctypes.POINTER(wasm_exporttype_vec_t), ctypes.POINTER(wasm_exporttype_vec_t)] def wasm_exporttype_vec_copy(out: Any, arg1: Any) -> None: return _wasm_exporttype_vec_copy(out, arg1) # type: ignore _wasm_exporttype_vec_delete = dll.wasm_exporttype_vec_delete _wasm_exporttype_vec_delete.restype = None -_wasm_exporttype_vec_delete.argtypes = [POINTER(wasm_exporttype_vec_t)] +_wasm_exporttype_vec_delete.argtypes = [ctypes.POINTER(wasm_exporttype_vec_t)] def wasm_exporttype_vec_delete(arg0: Any) -> None: return _wasm_exporttype_vec_delete(arg0) # type: ignore _wasm_exporttype_copy = dll.wasm_exporttype_copy -_wasm_exporttype_copy.restype = POINTER(wasm_exporttype_t) -_wasm_exporttype_copy.argtypes = [POINTER(wasm_exporttype_t)] +_wasm_exporttype_copy.restype = ctypes.POINTER(wasm_exporttype_t) +_wasm_exporttype_copy.argtypes = [ctypes.POINTER(wasm_exporttype_t)] def wasm_exporttype_copy(arg0: Any) -> ctypes._Pointer: return _wasm_exporttype_copy(arg0) # type: ignore _wasm_exporttype_new = dll.wasm_exporttype_new -_wasm_exporttype_new.restype = POINTER(wasm_exporttype_t) -_wasm_exporttype_new.argtypes = [POINTER(wasm_name_t), POINTER(wasm_externtype_t)] +_wasm_exporttype_new.restype = ctypes.POINTER(wasm_exporttype_t) +_wasm_exporttype_new.argtypes = [ctypes.POINTER(wasm_name_t), ctypes.POINTER(wasm_externtype_t)] def wasm_exporttype_new(arg0: Any, arg1: Any) -> ctypes._Pointer: return _wasm_exporttype_new(arg0, arg1) # type: ignore _wasm_exporttype_name = dll.wasm_exporttype_name -_wasm_exporttype_name.restype = POINTER(wasm_name_t) -_wasm_exporttype_name.argtypes = [POINTER(wasm_exporttype_t)] +_wasm_exporttype_name.restype = ctypes.POINTER(wasm_name_t) +_wasm_exporttype_name.argtypes = [ctypes.POINTER(wasm_exporttype_t)] def wasm_exporttype_name(arg0: Any) -> ctypes._Pointer: return _wasm_exporttype_name(arg0) # type: ignore _wasm_exporttype_type = dll.wasm_exporttype_type -_wasm_exporttype_type.restype = POINTER(wasm_externtype_t) -_wasm_exporttype_type.argtypes = [POINTER(wasm_exporttype_t)] +_wasm_exporttype_type.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_exporttype_type.argtypes = [ctypes.POINTER(wasm_exporttype_t)] def wasm_exporttype_type(arg0: Any) -> ctypes._Pointer: return _wasm_exporttype_type(arg0) # type: ignore _wasm_val_delete = dll.wasm_val_delete _wasm_val_delete.restype = None -_wasm_val_delete.argtypes = [POINTER(wasm_val_t)] +_wasm_val_delete.argtypes = [ctypes.POINTER(wasm_val_t)] def wasm_val_delete(v: Any) -> None: return _wasm_val_delete(v) # type: ignore _wasm_val_copy = dll.wasm_val_copy _wasm_val_copy.restype = None -_wasm_val_copy.argtypes = [POINTER(wasm_val_t), POINTER(wasm_val_t)] +_wasm_val_copy.argtypes = [ctypes.POINTER(wasm_val_t), ctypes.POINTER(wasm_val_t)] def wasm_val_copy(out: Any, arg1: Any) -> None: return _wasm_val_copy(out, arg1) # type: ignore -class wasm_val_vec_t(Structure): +class wasm_val_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(wasm_val_t)), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(wasm_val_t)), ] size: int data: ctypes._Pointer _wasm_val_vec_new_empty = dll.wasm_val_vec_new_empty _wasm_val_vec_new_empty.restype = None -_wasm_val_vec_new_empty.argtypes = [POINTER(wasm_val_vec_t)] +_wasm_val_vec_new_empty.argtypes = [ctypes.POINTER(wasm_val_vec_t)] def wasm_val_vec_new_empty(out: Any) -> None: return _wasm_val_vec_new_empty(out) # type: ignore _wasm_val_vec_new_uninitialized = dll.wasm_val_vec_new_uninitialized _wasm_val_vec_new_uninitialized.restype = None -_wasm_val_vec_new_uninitialized.argtypes = [POINTER(wasm_val_vec_t), c_size_t] +_wasm_val_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_val_vec_t), ctypes.c_size_t] def wasm_val_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_val_vec_new_uninitialized(out, arg1) # type: ignore _wasm_val_vec_new = dll.wasm_val_vec_new _wasm_val_vec_new.restype = None -_wasm_val_vec_new.argtypes = [POINTER(wasm_val_vec_t), c_size_t, POINTER(wasm_val_t)] +_wasm_val_vec_new.argtypes = [ctypes.POINTER(wasm_val_vec_t), ctypes.c_size_t, ctypes.POINTER(wasm_val_t)] def wasm_val_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_val_vec_new(out, arg1, arg2) # type: ignore _wasm_val_vec_copy = dll.wasm_val_vec_copy _wasm_val_vec_copy.restype = None -_wasm_val_vec_copy.argtypes = [POINTER(wasm_val_vec_t), POINTER(wasm_val_vec_t)] +_wasm_val_vec_copy.argtypes = [ctypes.POINTER(wasm_val_vec_t), ctypes.POINTER(wasm_val_vec_t)] def wasm_val_vec_copy(out: Any, arg1: Any) -> None: return _wasm_val_vec_copy(out, arg1) # type: ignore _wasm_val_vec_delete = dll.wasm_val_vec_delete _wasm_val_vec_delete.restype = None -_wasm_val_vec_delete.argtypes = [POINTER(wasm_val_vec_t)] +_wasm_val_vec_delete.argtypes = [ctypes.POINTER(wasm_val_vec_t)] def wasm_val_vec_delete(arg0: Any) -> None: return _wasm_val_vec_delete(arg0) # type: ignore _wasm_ref_delete = dll.wasm_ref_delete _wasm_ref_delete.restype = None -_wasm_ref_delete.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_delete.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_delete(arg0: Any) -> None: return _wasm_ref_delete(arg0) # type: ignore _wasm_ref_copy = dll.wasm_ref_copy -_wasm_ref_copy.restype = POINTER(wasm_ref_t) -_wasm_ref_copy.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_copy.restype = ctypes.POINTER(wasm_ref_t) +_wasm_ref_copy.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_copy(arg0: Any) -> ctypes._Pointer: return _wasm_ref_copy(arg0) # type: ignore _wasm_ref_same = dll.wasm_ref_same -_wasm_ref_same.restype = c_bool -_wasm_ref_same.argtypes = [POINTER(wasm_ref_t), POINTER(wasm_ref_t)] +_wasm_ref_same.restype = ctypes.c_bool +_wasm_ref_same.argtypes = [ctypes.POINTER(wasm_ref_t), ctypes.POINTER(wasm_ref_t)] def wasm_ref_same(arg0: Any, arg1: Any) -> bool: return _wasm_ref_same(arg0, arg1) # type: ignore _wasm_ref_get_host_info = dll.wasm_ref_get_host_info -_wasm_ref_get_host_info.restype = c_void_p -_wasm_ref_get_host_info.argtypes = [POINTER(wasm_ref_t)] -def wasm_ref_get_host_info(arg0: Any) -> int: +_wasm_ref_get_host_info.restype = ctypes.c_void_p +_wasm_ref_get_host_info.argtypes = [ctypes.POINTER(wasm_ref_t)] +def wasm_ref_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_ref_get_host_info(arg0) # type: ignore _wasm_ref_set_host_info = dll.wasm_ref_set_host_info _wasm_ref_set_host_info.restype = None -_wasm_ref_set_host_info.argtypes = [POINTER(wasm_ref_t), c_void_p] +_wasm_ref_set_host_info.argtypes = [ctypes.POINTER(wasm_ref_t), ctypes.c_void_p] def wasm_ref_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_ref_set_host_info(arg0, arg1) # type: ignore _wasm_ref_set_host_info_with_finalizer = dll.wasm_ref_set_host_info_with_finalizer _wasm_ref_set_host_info_with_finalizer.restype = None -_wasm_ref_set_host_info_with_finalizer.argtypes = [POINTER(wasm_ref_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_ref_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_ref_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_ref_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_ref_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore -class wasm_frame_t(Structure): +class wasm_frame_t(ctypes.Structure): pass _wasm_frame_delete = dll.wasm_frame_delete _wasm_frame_delete.restype = None -_wasm_frame_delete.argtypes = [POINTER(wasm_frame_t)] +_wasm_frame_delete.argtypes = [ctypes.POINTER(wasm_frame_t)] def wasm_frame_delete(arg0: Any) -> None: return _wasm_frame_delete(arg0) # type: ignore -class wasm_frame_vec_t(Structure): +class wasm_frame_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_frame_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_frame_t))), ] size: int data: ctypes._Pointer _wasm_frame_vec_new_empty = dll.wasm_frame_vec_new_empty _wasm_frame_vec_new_empty.restype = None -_wasm_frame_vec_new_empty.argtypes = [POINTER(wasm_frame_vec_t)] +_wasm_frame_vec_new_empty.argtypes = [ctypes.POINTER(wasm_frame_vec_t)] def wasm_frame_vec_new_empty(out: Any) -> None: return _wasm_frame_vec_new_empty(out) # type: ignore _wasm_frame_vec_new_uninitialized = dll.wasm_frame_vec_new_uninitialized _wasm_frame_vec_new_uninitialized.restype = None -_wasm_frame_vec_new_uninitialized.argtypes = [POINTER(wasm_frame_vec_t), c_size_t] +_wasm_frame_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_frame_vec_t), ctypes.c_size_t] def wasm_frame_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_frame_vec_new_uninitialized(out, arg1) # type: ignore _wasm_frame_vec_new = dll.wasm_frame_vec_new _wasm_frame_vec_new.restype = None -_wasm_frame_vec_new.argtypes = [POINTER(wasm_frame_vec_t), c_size_t, POINTER(POINTER(wasm_frame_t))] +_wasm_frame_vec_new.argtypes = [ctypes.POINTER(wasm_frame_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_frame_t))] def wasm_frame_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_frame_vec_new(out, arg1, arg2) # type: ignore _wasm_frame_vec_copy = dll.wasm_frame_vec_copy _wasm_frame_vec_copy.restype = None -_wasm_frame_vec_copy.argtypes = [POINTER(wasm_frame_vec_t), POINTER(wasm_frame_vec_t)] +_wasm_frame_vec_copy.argtypes = [ctypes.POINTER(wasm_frame_vec_t), ctypes.POINTER(wasm_frame_vec_t)] def wasm_frame_vec_copy(out: Any, arg1: Any) -> None: return _wasm_frame_vec_copy(out, arg1) # type: ignore _wasm_frame_vec_delete = dll.wasm_frame_vec_delete _wasm_frame_vec_delete.restype = None -_wasm_frame_vec_delete.argtypes = [POINTER(wasm_frame_vec_t)] +_wasm_frame_vec_delete.argtypes = [ctypes.POINTER(wasm_frame_vec_t)] def wasm_frame_vec_delete(arg0: Any) -> None: return _wasm_frame_vec_delete(arg0) # type: ignore _wasm_frame_copy = dll.wasm_frame_copy -_wasm_frame_copy.restype = POINTER(wasm_frame_t) -_wasm_frame_copy.argtypes = [POINTER(wasm_frame_t)] +_wasm_frame_copy.restype = ctypes.POINTER(wasm_frame_t) +_wasm_frame_copy.argtypes = [ctypes.POINTER(wasm_frame_t)] def wasm_frame_copy(arg0: Any) -> ctypes._Pointer: return _wasm_frame_copy(arg0) # type: ignore _wasm_frame_func_index = dll.wasm_frame_func_index -_wasm_frame_func_index.restype = c_uint32 -_wasm_frame_func_index.argtypes = [POINTER(wasm_frame_t)] +_wasm_frame_func_index.restype = ctypes.c_uint32 +_wasm_frame_func_index.argtypes = [ctypes.POINTER(wasm_frame_t)] def wasm_frame_func_index(arg0: Any) -> int: return _wasm_frame_func_index(arg0) # type: ignore _wasm_frame_func_offset = dll.wasm_frame_func_offset -_wasm_frame_func_offset.restype = c_size_t -_wasm_frame_func_offset.argtypes = [POINTER(wasm_frame_t)] +_wasm_frame_func_offset.restype = ctypes.c_size_t +_wasm_frame_func_offset.argtypes = [ctypes.POINTER(wasm_frame_t)] def wasm_frame_func_offset(arg0: Any) -> int: return _wasm_frame_func_offset(arg0) # type: ignore _wasm_frame_module_offset = dll.wasm_frame_module_offset -_wasm_frame_module_offset.restype = c_size_t -_wasm_frame_module_offset.argtypes = [POINTER(wasm_frame_t)] +_wasm_frame_module_offset.restype = ctypes.c_size_t +_wasm_frame_module_offset.argtypes = [ctypes.POINTER(wasm_frame_t)] def wasm_frame_module_offset(arg0: Any) -> int: return _wasm_frame_module_offset(arg0) # type: ignore wasm_message_t = wasm_name_t -class wasm_trap_t(Structure): +class wasm_trap_t(ctypes.Structure): pass _wasm_trap_delete = dll.wasm_trap_delete _wasm_trap_delete.restype = None -_wasm_trap_delete.argtypes = [POINTER(wasm_trap_t)] +_wasm_trap_delete.argtypes = [ctypes.POINTER(wasm_trap_t)] def wasm_trap_delete(arg0: Any) -> None: return _wasm_trap_delete(arg0) # type: ignore _wasm_trap_copy = dll.wasm_trap_copy -_wasm_trap_copy.restype = POINTER(wasm_trap_t) -_wasm_trap_copy.argtypes = [POINTER(wasm_trap_t)] +_wasm_trap_copy.restype = ctypes.POINTER(wasm_trap_t) +_wasm_trap_copy.argtypes = [ctypes.POINTER(wasm_trap_t)] def wasm_trap_copy(arg0: Any) -> ctypes._Pointer: return _wasm_trap_copy(arg0) # type: ignore _wasm_trap_same = dll.wasm_trap_same -_wasm_trap_same.restype = c_bool -_wasm_trap_same.argtypes = [POINTER(wasm_trap_t), POINTER(wasm_trap_t)] +_wasm_trap_same.restype = ctypes.c_bool +_wasm_trap_same.argtypes = [ctypes.POINTER(wasm_trap_t), ctypes.POINTER(wasm_trap_t)] def wasm_trap_same(arg0: Any, arg1: Any) -> bool: return _wasm_trap_same(arg0, arg1) # type: ignore _wasm_trap_get_host_info = dll.wasm_trap_get_host_info -_wasm_trap_get_host_info.restype = c_void_p -_wasm_trap_get_host_info.argtypes = [POINTER(wasm_trap_t)] -def wasm_trap_get_host_info(arg0: Any) -> int: +_wasm_trap_get_host_info.restype = ctypes.c_void_p +_wasm_trap_get_host_info.argtypes = [ctypes.POINTER(wasm_trap_t)] +def wasm_trap_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_trap_get_host_info(arg0) # type: ignore _wasm_trap_set_host_info = dll.wasm_trap_set_host_info _wasm_trap_set_host_info.restype = None -_wasm_trap_set_host_info.argtypes = [POINTER(wasm_trap_t), c_void_p] +_wasm_trap_set_host_info.argtypes = [ctypes.POINTER(wasm_trap_t), ctypes.c_void_p] def wasm_trap_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_trap_set_host_info(arg0, arg1) # type: ignore _wasm_trap_set_host_info_with_finalizer = dll.wasm_trap_set_host_info_with_finalizer _wasm_trap_set_host_info_with_finalizer.restype = None -_wasm_trap_set_host_info_with_finalizer.argtypes = [POINTER(wasm_trap_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_trap_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_trap_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_trap_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_trap_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore _wasm_trap_as_ref = dll.wasm_trap_as_ref -_wasm_trap_as_ref.restype = POINTER(wasm_ref_t) -_wasm_trap_as_ref.argtypes = [POINTER(wasm_trap_t)] +_wasm_trap_as_ref.restype = ctypes.POINTER(wasm_ref_t) +_wasm_trap_as_ref.argtypes = [ctypes.POINTER(wasm_trap_t)] def wasm_trap_as_ref(arg0: Any) -> ctypes._Pointer: return _wasm_trap_as_ref(arg0) # type: ignore _wasm_ref_as_trap = dll.wasm_ref_as_trap -_wasm_ref_as_trap.restype = POINTER(wasm_trap_t) -_wasm_ref_as_trap.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_trap.restype = ctypes.POINTER(wasm_trap_t) +_wasm_ref_as_trap.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_trap(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_trap(arg0) # type: ignore _wasm_trap_as_ref_const = dll.wasm_trap_as_ref_const -_wasm_trap_as_ref_const.restype = POINTER(wasm_ref_t) -_wasm_trap_as_ref_const.argtypes = [POINTER(wasm_trap_t)] +_wasm_trap_as_ref_const.restype = ctypes.POINTER(wasm_ref_t) +_wasm_trap_as_ref_const.argtypes = [ctypes.POINTER(wasm_trap_t)] def wasm_trap_as_ref_const(arg0: Any) -> ctypes._Pointer: return _wasm_trap_as_ref_const(arg0) # type: ignore _wasm_ref_as_trap_const = dll.wasm_ref_as_trap_const -_wasm_ref_as_trap_const.restype = POINTER(wasm_trap_t) -_wasm_ref_as_trap_const.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_trap_const.restype = ctypes.POINTER(wasm_trap_t) +_wasm_ref_as_trap_const.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_trap_const(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_trap_const(arg0) # type: ignore _wasm_trap_new = dll.wasm_trap_new -_wasm_trap_new.restype = POINTER(wasm_trap_t) -_wasm_trap_new.argtypes = [POINTER(wasm_store_t), POINTER(wasm_message_t)] +_wasm_trap_new.restype = ctypes.POINTER(wasm_trap_t) +_wasm_trap_new.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_message_t)] def wasm_trap_new(store: Any, arg1: Any) -> ctypes._Pointer: return _wasm_trap_new(store, arg1) # type: ignore _wasm_trap_message = dll.wasm_trap_message _wasm_trap_message.restype = None -_wasm_trap_message.argtypes = [POINTER(wasm_trap_t), POINTER(wasm_message_t)] +_wasm_trap_message.argtypes = [ctypes.POINTER(wasm_trap_t), ctypes.POINTER(wasm_message_t)] def wasm_trap_message(arg0: Any, out: Any) -> None: return _wasm_trap_message(arg0, out) # type: ignore _wasm_trap_origin = dll.wasm_trap_origin -_wasm_trap_origin.restype = POINTER(wasm_frame_t) -_wasm_trap_origin.argtypes = [POINTER(wasm_trap_t)] +_wasm_trap_origin.restype = ctypes.POINTER(wasm_frame_t) +_wasm_trap_origin.argtypes = [ctypes.POINTER(wasm_trap_t)] def wasm_trap_origin(arg0: Any) -> ctypes._Pointer: return _wasm_trap_origin(arg0) # type: ignore _wasm_trap_trace = dll.wasm_trap_trace _wasm_trap_trace.restype = None -_wasm_trap_trace.argtypes = [POINTER(wasm_trap_t), POINTER(wasm_frame_vec_t)] +_wasm_trap_trace.argtypes = [ctypes.POINTER(wasm_trap_t), ctypes.POINTER(wasm_frame_vec_t)] def wasm_trap_trace(arg0: Any, out: Any) -> None: return _wasm_trap_trace(arg0, out) # type: ignore -class wasm_foreign_t(Structure): +class wasm_foreign_t(ctypes.Structure): pass _wasm_foreign_delete = dll.wasm_foreign_delete _wasm_foreign_delete.restype = None -_wasm_foreign_delete.argtypes = [POINTER(wasm_foreign_t)] +_wasm_foreign_delete.argtypes = [ctypes.POINTER(wasm_foreign_t)] def wasm_foreign_delete(arg0: Any) -> None: return _wasm_foreign_delete(arg0) # type: ignore _wasm_foreign_copy = dll.wasm_foreign_copy -_wasm_foreign_copy.restype = POINTER(wasm_foreign_t) -_wasm_foreign_copy.argtypes = [POINTER(wasm_foreign_t)] +_wasm_foreign_copy.restype = ctypes.POINTER(wasm_foreign_t) +_wasm_foreign_copy.argtypes = [ctypes.POINTER(wasm_foreign_t)] def wasm_foreign_copy(arg0: Any) -> ctypes._Pointer: return _wasm_foreign_copy(arg0) # type: ignore _wasm_foreign_same = dll.wasm_foreign_same -_wasm_foreign_same.restype = c_bool -_wasm_foreign_same.argtypes = [POINTER(wasm_foreign_t), POINTER(wasm_foreign_t)] +_wasm_foreign_same.restype = ctypes.c_bool +_wasm_foreign_same.argtypes = [ctypes.POINTER(wasm_foreign_t), ctypes.POINTER(wasm_foreign_t)] def wasm_foreign_same(arg0: Any, arg1: Any) -> bool: return _wasm_foreign_same(arg0, arg1) # type: ignore _wasm_foreign_get_host_info = dll.wasm_foreign_get_host_info -_wasm_foreign_get_host_info.restype = c_void_p -_wasm_foreign_get_host_info.argtypes = [POINTER(wasm_foreign_t)] -def wasm_foreign_get_host_info(arg0: Any) -> int: +_wasm_foreign_get_host_info.restype = ctypes.c_void_p +_wasm_foreign_get_host_info.argtypes = [ctypes.POINTER(wasm_foreign_t)] +def wasm_foreign_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_foreign_get_host_info(arg0) # type: ignore _wasm_foreign_set_host_info = dll.wasm_foreign_set_host_info _wasm_foreign_set_host_info.restype = None -_wasm_foreign_set_host_info.argtypes = [POINTER(wasm_foreign_t), c_void_p] +_wasm_foreign_set_host_info.argtypes = [ctypes.POINTER(wasm_foreign_t), ctypes.c_void_p] def wasm_foreign_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_foreign_set_host_info(arg0, arg1) # type: ignore _wasm_foreign_set_host_info_with_finalizer = dll.wasm_foreign_set_host_info_with_finalizer _wasm_foreign_set_host_info_with_finalizer.restype = None -_wasm_foreign_set_host_info_with_finalizer.argtypes = [POINTER(wasm_foreign_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_foreign_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_foreign_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_foreign_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_foreign_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore _wasm_foreign_as_ref = dll.wasm_foreign_as_ref -_wasm_foreign_as_ref.restype = POINTER(wasm_ref_t) -_wasm_foreign_as_ref.argtypes = [POINTER(wasm_foreign_t)] +_wasm_foreign_as_ref.restype = ctypes.POINTER(wasm_ref_t) +_wasm_foreign_as_ref.argtypes = [ctypes.POINTER(wasm_foreign_t)] def wasm_foreign_as_ref(arg0: Any) -> ctypes._Pointer: return _wasm_foreign_as_ref(arg0) # type: ignore _wasm_ref_as_foreign = dll.wasm_ref_as_foreign -_wasm_ref_as_foreign.restype = POINTER(wasm_foreign_t) -_wasm_ref_as_foreign.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_foreign.restype = ctypes.POINTER(wasm_foreign_t) +_wasm_ref_as_foreign.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_foreign(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_foreign(arg0) # type: ignore _wasm_foreign_as_ref_const = dll.wasm_foreign_as_ref_const -_wasm_foreign_as_ref_const.restype = POINTER(wasm_ref_t) -_wasm_foreign_as_ref_const.argtypes = [POINTER(wasm_foreign_t)] +_wasm_foreign_as_ref_const.restype = ctypes.POINTER(wasm_ref_t) +_wasm_foreign_as_ref_const.argtypes = [ctypes.POINTER(wasm_foreign_t)] def wasm_foreign_as_ref_const(arg0: Any) -> ctypes._Pointer: return _wasm_foreign_as_ref_const(arg0) # type: ignore _wasm_ref_as_foreign_const = dll.wasm_ref_as_foreign_const -_wasm_ref_as_foreign_const.restype = POINTER(wasm_foreign_t) -_wasm_ref_as_foreign_const.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_foreign_const.restype = ctypes.POINTER(wasm_foreign_t) +_wasm_ref_as_foreign_const.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_foreign_const(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_foreign_const(arg0) # type: ignore _wasm_foreign_new = dll.wasm_foreign_new -_wasm_foreign_new.restype = POINTER(wasm_foreign_t) -_wasm_foreign_new.argtypes = [POINTER(wasm_store_t)] +_wasm_foreign_new.restype = ctypes.POINTER(wasm_foreign_t) +_wasm_foreign_new.argtypes = [ctypes.POINTER(wasm_store_t)] def wasm_foreign_new(arg0: Any) -> ctypes._Pointer: return _wasm_foreign_new(arg0) # type: ignore -class wasm_module_t(Structure): +class wasm_module_t(ctypes.Structure): pass _wasm_module_delete = dll.wasm_module_delete _wasm_module_delete.restype = None -_wasm_module_delete.argtypes = [POINTER(wasm_module_t)] +_wasm_module_delete.argtypes = [ctypes.POINTER(wasm_module_t)] def wasm_module_delete(arg0: Any) -> None: return _wasm_module_delete(arg0) # type: ignore _wasm_module_copy = dll.wasm_module_copy -_wasm_module_copy.restype = POINTER(wasm_module_t) -_wasm_module_copy.argtypes = [POINTER(wasm_module_t)] +_wasm_module_copy.restype = ctypes.POINTER(wasm_module_t) +_wasm_module_copy.argtypes = [ctypes.POINTER(wasm_module_t)] def wasm_module_copy(arg0: Any) -> ctypes._Pointer: return _wasm_module_copy(arg0) # type: ignore _wasm_module_same = dll.wasm_module_same -_wasm_module_same.restype = c_bool -_wasm_module_same.argtypes = [POINTER(wasm_module_t), POINTER(wasm_module_t)] +_wasm_module_same.restype = ctypes.c_bool +_wasm_module_same.argtypes = [ctypes.POINTER(wasm_module_t), ctypes.POINTER(wasm_module_t)] def wasm_module_same(arg0: Any, arg1: Any) -> bool: return _wasm_module_same(arg0, arg1) # type: ignore _wasm_module_get_host_info = dll.wasm_module_get_host_info -_wasm_module_get_host_info.restype = c_void_p -_wasm_module_get_host_info.argtypes = [POINTER(wasm_module_t)] -def wasm_module_get_host_info(arg0: Any) -> int: +_wasm_module_get_host_info.restype = ctypes.c_void_p +_wasm_module_get_host_info.argtypes = [ctypes.POINTER(wasm_module_t)] +def wasm_module_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_module_get_host_info(arg0) # type: ignore _wasm_module_set_host_info = dll.wasm_module_set_host_info _wasm_module_set_host_info.restype = None -_wasm_module_set_host_info.argtypes = [POINTER(wasm_module_t), c_void_p] +_wasm_module_set_host_info.argtypes = [ctypes.POINTER(wasm_module_t), ctypes.c_void_p] def wasm_module_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_module_set_host_info(arg0, arg1) # type: ignore _wasm_module_set_host_info_with_finalizer = dll.wasm_module_set_host_info_with_finalizer _wasm_module_set_host_info_with_finalizer.restype = None -_wasm_module_set_host_info_with_finalizer.argtypes = [POINTER(wasm_module_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_module_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_module_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_module_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_module_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore _wasm_module_as_ref = dll.wasm_module_as_ref -_wasm_module_as_ref.restype = POINTER(wasm_ref_t) -_wasm_module_as_ref.argtypes = [POINTER(wasm_module_t)] +_wasm_module_as_ref.restype = ctypes.POINTER(wasm_ref_t) +_wasm_module_as_ref.argtypes = [ctypes.POINTER(wasm_module_t)] def wasm_module_as_ref(arg0: Any) -> ctypes._Pointer: return _wasm_module_as_ref(arg0) # type: ignore _wasm_ref_as_module = dll.wasm_ref_as_module -_wasm_ref_as_module.restype = POINTER(wasm_module_t) -_wasm_ref_as_module.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_module.restype = ctypes.POINTER(wasm_module_t) +_wasm_ref_as_module.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_module(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_module(arg0) # type: ignore _wasm_module_as_ref_const = dll.wasm_module_as_ref_const -_wasm_module_as_ref_const.restype = POINTER(wasm_ref_t) -_wasm_module_as_ref_const.argtypes = [POINTER(wasm_module_t)] +_wasm_module_as_ref_const.restype = ctypes.POINTER(wasm_ref_t) +_wasm_module_as_ref_const.argtypes = [ctypes.POINTER(wasm_module_t)] def wasm_module_as_ref_const(arg0: Any) -> ctypes._Pointer: return _wasm_module_as_ref_const(arg0) # type: ignore _wasm_ref_as_module_const = dll.wasm_ref_as_module_const -_wasm_ref_as_module_const.restype = POINTER(wasm_module_t) -_wasm_ref_as_module_const.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_module_const.restype = ctypes.POINTER(wasm_module_t) +_wasm_ref_as_module_const.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_module_const(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_module_const(arg0) # type: ignore -class wasm_shared_module_t(Structure): +class wasm_shared_module_t(ctypes.Structure): pass _wasm_shared_module_delete = dll.wasm_shared_module_delete _wasm_shared_module_delete.restype = None -_wasm_shared_module_delete.argtypes = [POINTER(wasm_shared_module_t)] +_wasm_shared_module_delete.argtypes = [ctypes.POINTER(wasm_shared_module_t)] def wasm_shared_module_delete(arg0: Any) -> None: return _wasm_shared_module_delete(arg0) # type: ignore _wasm_module_share = dll.wasm_module_share -_wasm_module_share.restype = POINTER(wasm_shared_module_t) -_wasm_module_share.argtypes = [POINTER(wasm_module_t)] +_wasm_module_share.restype = ctypes.POINTER(wasm_shared_module_t) +_wasm_module_share.argtypes = [ctypes.POINTER(wasm_module_t)] def wasm_module_share(arg0: Any) -> ctypes._Pointer: return _wasm_module_share(arg0) # type: ignore _wasm_module_obtain = dll.wasm_module_obtain -_wasm_module_obtain.restype = POINTER(wasm_module_t) -_wasm_module_obtain.argtypes = [POINTER(wasm_store_t), POINTER(wasm_shared_module_t)] +_wasm_module_obtain.restype = ctypes.POINTER(wasm_module_t) +_wasm_module_obtain.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_shared_module_t)] def wasm_module_obtain(arg0: Any, arg1: Any) -> ctypes._Pointer: return _wasm_module_obtain(arg0, arg1) # type: ignore _wasm_module_new = dll.wasm_module_new -_wasm_module_new.restype = POINTER(wasm_module_t) -_wasm_module_new.argtypes = [POINTER(wasm_store_t), POINTER(wasm_byte_vec_t)] +_wasm_module_new.restype = ctypes.POINTER(wasm_module_t) +_wasm_module_new.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_byte_vec_t)] def wasm_module_new(arg0: Any, binary: Any) -> ctypes._Pointer: return _wasm_module_new(arg0, binary) # type: ignore _wasm_module_validate = dll.wasm_module_validate -_wasm_module_validate.restype = c_bool -_wasm_module_validate.argtypes = [POINTER(wasm_store_t), POINTER(wasm_byte_vec_t)] +_wasm_module_validate.restype = ctypes.c_bool +_wasm_module_validate.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_byte_vec_t)] def wasm_module_validate(arg0: Any, binary: Any) -> bool: return _wasm_module_validate(arg0, binary) # type: ignore _wasm_module_imports = dll.wasm_module_imports _wasm_module_imports.restype = None -_wasm_module_imports.argtypes = [POINTER(wasm_module_t), POINTER(wasm_importtype_vec_t)] +_wasm_module_imports.argtypes = [ctypes.POINTER(wasm_module_t), ctypes.POINTER(wasm_importtype_vec_t)] def wasm_module_imports(arg0: Any, out: Any) -> None: return _wasm_module_imports(arg0, out) # type: ignore _wasm_module_exports = dll.wasm_module_exports _wasm_module_exports.restype = None -_wasm_module_exports.argtypes = [POINTER(wasm_module_t), POINTER(wasm_exporttype_vec_t)] +_wasm_module_exports.argtypes = [ctypes.POINTER(wasm_module_t), ctypes.POINTER(wasm_exporttype_vec_t)] def wasm_module_exports(arg0: Any, out: Any) -> None: return _wasm_module_exports(arg0, out) # type: ignore _wasm_module_serialize = dll.wasm_module_serialize _wasm_module_serialize.restype = None -_wasm_module_serialize.argtypes = [POINTER(wasm_module_t), POINTER(wasm_byte_vec_t)] +_wasm_module_serialize.argtypes = [ctypes.POINTER(wasm_module_t), ctypes.POINTER(wasm_byte_vec_t)] def wasm_module_serialize(arg0: Any, out: Any) -> None: return _wasm_module_serialize(arg0, out) # type: ignore _wasm_module_deserialize = dll.wasm_module_deserialize -_wasm_module_deserialize.restype = POINTER(wasm_module_t) -_wasm_module_deserialize.argtypes = [POINTER(wasm_store_t), POINTER(wasm_byte_vec_t)] +_wasm_module_deserialize.restype = ctypes.POINTER(wasm_module_t) +_wasm_module_deserialize.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_byte_vec_t)] def wasm_module_deserialize(arg0: Any, arg1: Any) -> ctypes._Pointer: return _wasm_module_deserialize(arg0, arg1) # type: ignore -class wasm_func_t(Structure): +class wasm_func_t(ctypes.Structure): pass _wasm_func_delete = dll.wasm_func_delete _wasm_func_delete.restype = None -_wasm_func_delete.argtypes = [POINTER(wasm_func_t)] +_wasm_func_delete.argtypes = [ctypes.POINTER(wasm_func_t)] def wasm_func_delete(arg0: Any) -> None: return _wasm_func_delete(arg0) # type: ignore _wasm_func_copy = dll.wasm_func_copy -_wasm_func_copy.restype = POINTER(wasm_func_t) -_wasm_func_copy.argtypes = [POINTER(wasm_func_t)] +_wasm_func_copy.restype = ctypes.POINTER(wasm_func_t) +_wasm_func_copy.argtypes = [ctypes.POINTER(wasm_func_t)] def wasm_func_copy(arg0: Any) -> ctypes._Pointer: return _wasm_func_copy(arg0) # type: ignore _wasm_func_same = dll.wasm_func_same -_wasm_func_same.restype = c_bool -_wasm_func_same.argtypes = [POINTER(wasm_func_t), POINTER(wasm_func_t)] +_wasm_func_same.restype = ctypes.c_bool +_wasm_func_same.argtypes = [ctypes.POINTER(wasm_func_t), ctypes.POINTER(wasm_func_t)] def wasm_func_same(arg0: Any, arg1: Any) -> bool: return _wasm_func_same(arg0, arg1) # type: ignore _wasm_func_get_host_info = dll.wasm_func_get_host_info -_wasm_func_get_host_info.restype = c_void_p -_wasm_func_get_host_info.argtypes = [POINTER(wasm_func_t)] -def wasm_func_get_host_info(arg0: Any) -> int: +_wasm_func_get_host_info.restype = ctypes.c_void_p +_wasm_func_get_host_info.argtypes = [ctypes.POINTER(wasm_func_t)] +def wasm_func_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_func_get_host_info(arg0) # type: ignore _wasm_func_set_host_info = dll.wasm_func_set_host_info _wasm_func_set_host_info.restype = None -_wasm_func_set_host_info.argtypes = [POINTER(wasm_func_t), c_void_p] +_wasm_func_set_host_info.argtypes = [ctypes.POINTER(wasm_func_t), ctypes.c_void_p] def wasm_func_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_func_set_host_info(arg0, arg1) # type: ignore _wasm_func_set_host_info_with_finalizer = dll.wasm_func_set_host_info_with_finalizer _wasm_func_set_host_info_with_finalizer.restype = None -_wasm_func_set_host_info_with_finalizer.argtypes = [POINTER(wasm_func_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_func_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_func_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_func_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_func_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore _wasm_func_as_ref = dll.wasm_func_as_ref -_wasm_func_as_ref.restype = POINTER(wasm_ref_t) -_wasm_func_as_ref.argtypes = [POINTER(wasm_func_t)] +_wasm_func_as_ref.restype = ctypes.POINTER(wasm_ref_t) +_wasm_func_as_ref.argtypes = [ctypes.POINTER(wasm_func_t)] def wasm_func_as_ref(arg0: Any) -> ctypes._Pointer: return _wasm_func_as_ref(arg0) # type: ignore _wasm_ref_as_func = dll.wasm_ref_as_func -_wasm_ref_as_func.restype = POINTER(wasm_func_t) -_wasm_ref_as_func.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_func.restype = ctypes.POINTER(wasm_func_t) +_wasm_ref_as_func.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_func(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_func(arg0) # type: ignore _wasm_func_as_ref_const = dll.wasm_func_as_ref_const -_wasm_func_as_ref_const.restype = POINTER(wasm_ref_t) -_wasm_func_as_ref_const.argtypes = [POINTER(wasm_func_t)] +_wasm_func_as_ref_const.restype = ctypes.POINTER(wasm_ref_t) +_wasm_func_as_ref_const.argtypes = [ctypes.POINTER(wasm_func_t)] def wasm_func_as_ref_const(arg0: Any) -> ctypes._Pointer: return _wasm_func_as_ref_const(arg0) # type: ignore _wasm_ref_as_func_const = dll.wasm_ref_as_func_const -_wasm_ref_as_func_const.restype = POINTER(wasm_func_t) -_wasm_ref_as_func_const.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_func_const.restype = ctypes.POINTER(wasm_func_t) +_wasm_ref_as_func_const.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_func_const(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_func_const(arg0) # type: ignore -wasm_func_callback_t = CFUNCTYPE(c_size_t, POINTER(wasm_val_vec_t), POINTER(wasm_val_vec_t)) +wasm_func_callback_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.POINTER(wasm_val_vec_t), ctypes.POINTER(wasm_val_vec_t)) -wasm_func_callback_with_env_t = CFUNCTYPE(c_size_t, c_void_p, POINTER(wasm_val_vec_t), POINTER(wasm_val_vec_t)) +wasm_func_callback_with_env_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.POINTER(wasm_val_vec_t), ctypes.POINTER(wasm_val_vec_t)) _wasm_func_new = dll.wasm_func_new -_wasm_func_new.restype = POINTER(wasm_func_t) -_wasm_func_new.argtypes = [POINTER(wasm_store_t), POINTER(wasm_functype_t), wasm_func_callback_t] +_wasm_func_new.restype = ctypes.POINTER(wasm_func_t) +_wasm_func_new.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_functype_t), wasm_func_callback_t] def wasm_func_new(arg0: Any, arg1: Any, arg2: Any) -> ctypes._Pointer: return _wasm_func_new(arg0, arg1, arg2) # type: ignore _wasm_func_new_with_env = dll.wasm_func_new_with_env -_wasm_func_new_with_env.restype = POINTER(wasm_func_t) -_wasm_func_new_with_env.argtypes = [POINTER(wasm_store_t), POINTER(wasm_functype_t), wasm_func_callback_with_env_t, c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_func_new_with_env.restype = ctypes.POINTER(wasm_func_t) +_wasm_func_new_with_env.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_functype_t), wasm_func_callback_with_env_t, ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_func_new_with_env(arg0: Any, type: Any, arg2: Any, env: Any, finalizer: Any) -> ctypes._Pointer: return _wasm_func_new_with_env(arg0, type, arg2, env, finalizer) # type: ignore _wasm_func_type = dll.wasm_func_type -_wasm_func_type.restype = POINTER(wasm_functype_t) -_wasm_func_type.argtypes = [POINTER(wasm_func_t)] +_wasm_func_type.restype = ctypes.POINTER(wasm_functype_t) +_wasm_func_type.argtypes = [ctypes.POINTER(wasm_func_t)] def wasm_func_type(arg0: Any) -> ctypes._Pointer: return _wasm_func_type(arg0) # type: ignore _wasm_func_param_arity = dll.wasm_func_param_arity -_wasm_func_param_arity.restype = c_size_t -_wasm_func_param_arity.argtypes = [POINTER(wasm_func_t)] +_wasm_func_param_arity.restype = ctypes.c_size_t +_wasm_func_param_arity.argtypes = [ctypes.POINTER(wasm_func_t)] def wasm_func_param_arity(arg0: Any) -> int: return _wasm_func_param_arity(arg0) # type: ignore _wasm_func_result_arity = dll.wasm_func_result_arity -_wasm_func_result_arity.restype = c_size_t -_wasm_func_result_arity.argtypes = [POINTER(wasm_func_t)] +_wasm_func_result_arity.restype = ctypes.c_size_t +_wasm_func_result_arity.argtypes = [ctypes.POINTER(wasm_func_t)] def wasm_func_result_arity(arg0: Any) -> int: return _wasm_func_result_arity(arg0) # type: ignore _wasm_func_call = dll.wasm_func_call -_wasm_func_call.restype = POINTER(wasm_trap_t) -_wasm_func_call.argtypes = [POINTER(wasm_func_t), POINTER(wasm_val_vec_t), POINTER(wasm_val_vec_t)] +_wasm_func_call.restype = ctypes.POINTER(wasm_trap_t) +_wasm_func_call.argtypes = [ctypes.POINTER(wasm_func_t), ctypes.POINTER(wasm_val_vec_t), ctypes.POINTER(wasm_val_vec_t)] def wasm_func_call(arg0: Any, args: Any, results: Any) -> ctypes._Pointer: return _wasm_func_call(arg0, args, results) # type: ignore -class wasm_global_t(Structure): +class wasm_global_t(ctypes.Structure): pass _wasm_global_delete = dll.wasm_global_delete _wasm_global_delete.restype = None -_wasm_global_delete.argtypes = [POINTER(wasm_global_t)] +_wasm_global_delete.argtypes = [ctypes.POINTER(wasm_global_t)] def wasm_global_delete(arg0: Any) -> None: return _wasm_global_delete(arg0) # type: ignore _wasm_global_copy = dll.wasm_global_copy -_wasm_global_copy.restype = POINTER(wasm_global_t) -_wasm_global_copy.argtypes = [POINTER(wasm_global_t)] +_wasm_global_copy.restype = ctypes.POINTER(wasm_global_t) +_wasm_global_copy.argtypes = [ctypes.POINTER(wasm_global_t)] def wasm_global_copy(arg0: Any) -> ctypes._Pointer: return _wasm_global_copy(arg0) # type: ignore _wasm_global_same = dll.wasm_global_same -_wasm_global_same.restype = c_bool -_wasm_global_same.argtypes = [POINTER(wasm_global_t), POINTER(wasm_global_t)] +_wasm_global_same.restype = ctypes.c_bool +_wasm_global_same.argtypes = [ctypes.POINTER(wasm_global_t), ctypes.POINTER(wasm_global_t)] def wasm_global_same(arg0: Any, arg1: Any) -> bool: return _wasm_global_same(arg0, arg1) # type: ignore _wasm_global_get_host_info = dll.wasm_global_get_host_info -_wasm_global_get_host_info.restype = c_void_p -_wasm_global_get_host_info.argtypes = [POINTER(wasm_global_t)] -def wasm_global_get_host_info(arg0: Any) -> int: +_wasm_global_get_host_info.restype = ctypes.c_void_p +_wasm_global_get_host_info.argtypes = [ctypes.POINTER(wasm_global_t)] +def wasm_global_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_global_get_host_info(arg0) # type: ignore _wasm_global_set_host_info = dll.wasm_global_set_host_info _wasm_global_set_host_info.restype = None -_wasm_global_set_host_info.argtypes = [POINTER(wasm_global_t), c_void_p] +_wasm_global_set_host_info.argtypes = [ctypes.POINTER(wasm_global_t), ctypes.c_void_p] def wasm_global_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_global_set_host_info(arg0, arg1) # type: ignore _wasm_global_set_host_info_with_finalizer = dll.wasm_global_set_host_info_with_finalizer _wasm_global_set_host_info_with_finalizer.restype = None -_wasm_global_set_host_info_with_finalizer.argtypes = [POINTER(wasm_global_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_global_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_global_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_global_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_global_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore _wasm_global_as_ref = dll.wasm_global_as_ref -_wasm_global_as_ref.restype = POINTER(wasm_ref_t) -_wasm_global_as_ref.argtypes = [POINTER(wasm_global_t)] +_wasm_global_as_ref.restype = ctypes.POINTER(wasm_ref_t) +_wasm_global_as_ref.argtypes = [ctypes.POINTER(wasm_global_t)] def wasm_global_as_ref(arg0: Any) -> ctypes._Pointer: return _wasm_global_as_ref(arg0) # type: ignore _wasm_ref_as_global = dll.wasm_ref_as_global -_wasm_ref_as_global.restype = POINTER(wasm_global_t) -_wasm_ref_as_global.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_global.restype = ctypes.POINTER(wasm_global_t) +_wasm_ref_as_global.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_global(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_global(arg0) # type: ignore _wasm_global_as_ref_const = dll.wasm_global_as_ref_const -_wasm_global_as_ref_const.restype = POINTER(wasm_ref_t) -_wasm_global_as_ref_const.argtypes = [POINTER(wasm_global_t)] +_wasm_global_as_ref_const.restype = ctypes.POINTER(wasm_ref_t) +_wasm_global_as_ref_const.argtypes = [ctypes.POINTER(wasm_global_t)] def wasm_global_as_ref_const(arg0: Any) -> ctypes._Pointer: return _wasm_global_as_ref_const(arg0) # type: ignore _wasm_ref_as_global_const = dll.wasm_ref_as_global_const -_wasm_ref_as_global_const.restype = POINTER(wasm_global_t) -_wasm_ref_as_global_const.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_global_const.restype = ctypes.POINTER(wasm_global_t) +_wasm_ref_as_global_const.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_global_const(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_global_const(arg0) # type: ignore _wasm_global_new = dll.wasm_global_new -_wasm_global_new.restype = POINTER(wasm_global_t) -_wasm_global_new.argtypes = [POINTER(wasm_store_t), POINTER(wasm_globaltype_t), POINTER(wasm_val_t)] +_wasm_global_new.restype = ctypes.POINTER(wasm_global_t) +_wasm_global_new.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_globaltype_t), ctypes.POINTER(wasm_val_t)] def wasm_global_new(arg0: Any, arg1: Any, arg2: Any) -> ctypes._Pointer: return _wasm_global_new(arg0, arg1, arg2) # type: ignore _wasm_global_type = dll.wasm_global_type -_wasm_global_type.restype = POINTER(wasm_globaltype_t) -_wasm_global_type.argtypes = [POINTER(wasm_global_t)] +_wasm_global_type.restype = ctypes.POINTER(wasm_globaltype_t) +_wasm_global_type.argtypes = [ctypes.POINTER(wasm_global_t)] def wasm_global_type(arg0: Any) -> ctypes._Pointer: return _wasm_global_type(arg0) # type: ignore _wasm_global_get = dll.wasm_global_get _wasm_global_get.restype = None -_wasm_global_get.argtypes = [POINTER(wasm_global_t), POINTER(wasm_val_t)] +_wasm_global_get.argtypes = [ctypes.POINTER(wasm_global_t), ctypes.POINTER(wasm_val_t)] def wasm_global_get(arg0: Any, out: Any) -> None: return _wasm_global_get(arg0, out) # type: ignore _wasm_global_set = dll.wasm_global_set _wasm_global_set.restype = None -_wasm_global_set.argtypes = [POINTER(wasm_global_t), POINTER(wasm_val_t)] +_wasm_global_set.argtypes = [ctypes.POINTER(wasm_global_t), ctypes.POINTER(wasm_val_t)] def wasm_global_set(arg0: Any, arg1: Any) -> None: return _wasm_global_set(arg0, arg1) # type: ignore -class wasm_table_t(Structure): +class wasm_table_t(ctypes.Structure): pass _wasm_table_delete = dll.wasm_table_delete _wasm_table_delete.restype = None -_wasm_table_delete.argtypes = [POINTER(wasm_table_t)] +_wasm_table_delete.argtypes = [ctypes.POINTER(wasm_table_t)] def wasm_table_delete(arg0: Any) -> None: return _wasm_table_delete(arg0) # type: ignore _wasm_table_copy = dll.wasm_table_copy -_wasm_table_copy.restype = POINTER(wasm_table_t) -_wasm_table_copy.argtypes = [POINTER(wasm_table_t)] +_wasm_table_copy.restype = ctypes.POINTER(wasm_table_t) +_wasm_table_copy.argtypes = [ctypes.POINTER(wasm_table_t)] def wasm_table_copy(arg0: Any) -> ctypes._Pointer: return _wasm_table_copy(arg0) # type: ignore _wasm_table_same = dll.wasm_table_same -_wasm_table_same.restype = c_bool -_wasm_table_same.argtypes = [POINTER(wasm_table_t), POINTER(wasm_table_t)] +_wasm_table_same.restype = ctypes.c_bool +_wasm_table_same.argtypes = [ctypes.POINTER(wasm_table_t), ctypes.POINTER(wasm_table_t)] def wasm_table_same(arg0: Any, arg1: Any) -> bool: return _wasm_table_same(arg0, arg1) # type: ignore _wasm_table_get_host_info = dll.wasm_table_get_host_info -_wasm_table_get_host_info.restype = c_void_p -_wasm_table_get_host_info.argtypes = [POINTER(wasm_table_t)] -def wasm_table_get_host_info(arg0: Any) -> int: +_wasm_table_get_host_info.restype = ctypes.c_void_p +_wasm_table_get_host_info.argtypes = [ctypes.POINTER(wasm_table_t)] +def wasm_table_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_table_get_host_info(arg0) # type: ignore _wasm_table_set_host_info = dll.wasm_table_set_host_info _wasm_table_set_host_info.restype = None -_wasm_table_set_host_info.argtypes = [POINTER(wasm_table_t), c_void_p] +_wasm_table_set_host_info.argtypes = [ctypes.POINTER(wasm_table_t), ctypes.c_void_p] def wasm_table_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_table_set_host_info(arg0, arg1) # type: ignore _wasm_table_set_host_info_with_finalizer = dll.wasm_table_set_host_info_with_finalizer _wasm_table_set_host_info_with_finalizer.restype = None -_wasm_table_set_host_info_with_finalizer.argtypes = [POINTER(wasm_table_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_table_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_table_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_table_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_table_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore _wasm_table_as_ref = dll.wasm_table_as_ref -_wasm_table_as_ref.restype = POINTER(wasm_ref_t) -_wasm_table_as_ref.argtypes = [POINTER(wasm_table_t)] +_wasm_table_as_ref.restype = ctypes.POINTER(wasm_ref_t) +_wasm_table_as_ref.argtypes = [ctypes.POINTER(wasm_table_t)] def wasm_table_as_ref(arg0: Any) -> ctypes._Pointer: return _wasm_table_as_ref(arg0) # type: ignore _wasm_ref_as_table = dll.wasm_ref_as_table -_wasm_ref_as_table.restype = POINTER(wasm_table_t) -_wasm_ref_as_table.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_table.restype = ctypes.POINTER(wasm_table_t) +_wasm_ref_as_table.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_table(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_table(arg0) # type: ignore _wasm_table_as_ref_const = dll.wasm_table_as_ref_const -_wasm_table_as_ref_const.restype = POINTER(wasm_ref_t) -_wasm_table_as_ref_const.argtypes = [POINTER(wasm_table_t)] +_wasm_table_as_ref_const.restype = ctypes.POINTER(wasm_ref_t) +_wasm_table_as_ref_const.argtypes = [ctypes.POINTER(wasm_table_t)] def wasm_table_as_ref_const(arg0: Any) -> ctypes._Pointer: return _wasm_table_as_ref_const(arg0) # type: ignore _wasm_ref_as_table_const = dll.wasm_ref_as_table_const -_wasm_ref_as_table_const.restype = POINTER(wasm_table_t) -_wasm_ref_as_table_const.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_table_const.restype = ctypes.POINTER(wasm_table_t) +_wasm_ref_as_table_const.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_table_const(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_table_const(arg0) # type: ignore -wasm_table_size_t = c_uint32 +wasm_table_size_t = ctypes.c_uint32 _wasm_table_new = dll.wasm_table_new -_wasm_table_new.restype = POINTER(wasm_table_t) -_wasm_table_new.argtypes = [POINTER(wasm_store_t), POINTER(wasm_tabletype_t), POINTER(wasm_ref_t)] +_wasm_table_new.restype = ctypes.POINTER(wasm_table_t) +_wasm_table_new.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_tabletype_t), ctypes.POINTER(wasm_ref_t)] def wasm_table_new(arg0: Any, arg1: Any, init: Any) -> ctypes._Pointer: return _wasm_table_new(arg0, arg1, init) # type: ignore _wasm_table_type = dll.wasm_table_type -_wasm_table_type.restype = POINTER(wasm_tabletype_t) -_wasm_table_type.argtypes = [POINTER(wasm_table_t)] +_wasm_table_type.restype = ctypes.POINTER(wasm_tabletype_t) +_wasm_table_type.argtypes = [ctypes.POINTER(wasm_table_t)] def wasm_table_type(arg0: Any) -> ctypes._Pointer: return _wasm_table_type(arg0) # type: ignore _wasm_table_get = dll.wasm_table_get -_wasm_table_get.restype = POINTER(wasm_ref_t) -_wasm_table_get.argtypes = [POINTER(wasm_table_t), wasm_table_size_t] +_wasm_table_get.restype = ctypes.POINTER(wasm_ref_t) +_wasm_table_get.argtypes = [ctypes.POINTER(wasm_table_t), wasm_table_size_t] def wasm_table_get(arg0: Any, index: Any) -> ctypes._Pointer: return _wasm_table_get(arg0, index) # type: ignore _wasm_table_set = dll.wasm_table_set -_wasm_table_set.restype = c_bool -_wasm_table_set.argtypes = [POINTER(wasm_table_t), wasm_table_size_t, POINTER(wasm_ref_t)] +_wasm_table_set.restype = ctypes.c_bool +_wasm_table_set.argtypes = [ctypes.POINTER(wasm_table_t), wasm_table_size_t, ctypes.POINTER(wasm_ref_t)] def wasm_table_set(arg0: Any, index: Any, arg2: Any) -> bool: return _wasm_table_set(arg0, index, arg2) # type: ignore _wasm_table_size = dll.wasm_table_size _wasm_table_size.restype = wasm_table_size_t -_wasm_table_size.argtypes = [POINTER(wasm_table_t)] +_wasm_table_size.argtypes = [ctypes.POINTER(wasm_table_t)] def wasm_table_size(arg0: Any) -> int: return _wasm_table_size(arg0) # type: ignore _wasm_table_grow = dll.wasm_table_grow -_wasm_table_grow.restype = c_bool -_wasm_table_grow.argtypes = [POINTER(wasm_table_t), wasm_table_size_t, POINTER(wasm_ref_t)] +_wasm_table_grow.restype = ctypes.c_bool +_wasm_table_grow.argtypes = [ctypes.POINTER(wasm_table_t), wasm_table_size_t, ctypes.POINTER(wasm_ref_t)] def wasm_table_grow(arg0: Any, delta: Any, init: Any) -> bool: return _wasm_table_grow(arg0, delta, init) # type: ignore -class wasm_memory_t(Structure): +class wasm_memory_t(ctypes.Structure): pass _wasm_memory_delete = dll.wasm_memory_delete _wasm_memory_delete.restype = None -_wasm_memory_delete.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_delete.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_delete(arg0: Any) -> None: return _wasm_memory_delete(arg0) # type: ignore _wasm_memory_copy = dll.wasm_memory_copy -_wasm_memory_copy.restype = POINTER(wasm_memory_t) -_wasm_memory_copy.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_copy.restype = ctypes.POINTER(wasm_memory_t) +_wasm_memory_copy.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_copy(arg0: Any) -> ctypes._Pointer: return _wasm_memory_copy(arg0) # type: ignore _wasm_memory_same = dll.wasm_memory_same -_wasm_memory_same.restype = c_bool -_wasm_memory_same.argtypes = [POINTER(wasm_memory_t), POINTER(wasm_memory_t)] +_wasm_memory_same.restype = ctypes.c_bool +_wasm_memory_same.argtypes = [ctypes.POINTER(wasm_memory_t), ctypes.POINTER(wasm_memory_t)] def wasm_memory_same(arg0: Any, arg1: Any) -> bool: return _wasm_memory_same(arg0, arg1) # type: ignore _wasm_memory_get_host_info = dll.wasm_memory_get_host_info -_wasm_memory_get_host_info.restype = c_void_p -_wasm_memory_get_host_info.argtypes = [POINTER(wasm_memory_t)] -def wasm_memory_get_host_info(arg0: Any) -> int: +_wasm_memory_get_host_info.restype = ctypes.c_void_p +_wasm_memory_get_host_info.argtypes = [ctypes.POINTER(wasm_memory_t)] +def wasm_memory_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_memory_get_host_info(arg0) # type: ignore _wasm_memory_set_host_info = dll.wasm_memory_set_host_info _wasm_memory_set_host_info.restype = None -_wasm_memory_set_host_info.argtypes = [POINTER(wasm_memory_t), c_void_p] +_wasm_memory_set_host_info.argtypes = [ctypes.POINTER(wasm_memory_t), ctypes.c_void_p] def wasm_memory_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_memory_set_host_info(arg0, arg1) # type: ignore _wasm_memory_set_host_info_with_finalizer = dll.wasm_memory_set_host_info_with_finalizer _wasm_memory_set_host_info_with_finalizer.restype = None -_wasm_memory_set_host_info_with_finalizer.argtypes = [POINTER(wasm_memory_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_memory_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_memory_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_memory_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_memory_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore _wasm_memory_as_ref = dll.wasm_memory_as_ref -_wasm_memory_as_ref.restype = POINTER(wasm_ref_t) -_wasm_memory_as_ref.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_as_ref.restype = ctypes.POINTER(wasm_ref_t) +_wasm_memory_as_ref.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_as_ref(arg0: Any) -> ctypes._Pointer: return _wasm_memory_as_ref(arg0) # type: ignore _wasm_ref_as_memory = dll.wasm_ref_as_memory -_wasm_ref_as_memory.restype = POINTER(wasm_memory_t) -_wasm_ref_as_memory.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_memory.restype = ctypes.POINTER(wasm_memory_t) +_wasm_ref_as_memory.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_memory(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_memory(arg0) # type: ignore _wasm_memory_as_ref_const = dll.wasm_memory_as_ref_const -_wasm_memory_as_ref_const.restype = POINTER(wasm_ref_t) -_wasm_memory_as_ref_const.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_as_ref_const.restype = ctypes.POINTER(wasm_ref_t) +_wasm_memory_as_ref_const.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_as_ref_const(arg0: Any) -> ctypes._Pointer: return _wasm_memory_as_ref_const(arg0) # type: ignore _wasm_ref_as_memory_const = dll.wasm_ref_as_memory_const -_wasm_ref_as_memory_const.restype = POINTER(wasm_memory_t) -_wasm_ref_as_memory_const.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_memory_const.restype = ctypes.POINTER(wasm_memory_t) +_wasm_ref_as_memory_const.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_memory_const(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_memory_const(arg0) # type: ignore -wasm_memory_pages_t = c_uint32 +wasm_memory_pages_t = ctypes.c_uint32 _wasm_memory_new = dll.wasm_memory_new -_wasm_memory_new.restype = POINTER(wasm_memory_t) -_wasm_memory_new.argtypes = [POINTER(wasm_store_t), POINTER(wasm_memorytype_t)] +_wasm_memory_new.restype = ctypes.POINTER(wasm_memory_t) +_wasm_memory_new.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_memorytype_t)] def wasm_memory_new(arg0: Any, arg1: Any) -> ctypes._Pointer: return _wasm_memory_new(arg0, arg1) # type: ignore _wasm_memory_type = dll.wasm_memory_type -_wasm_memory_type.restype = POINTER(wasm_memorytype_t) -_wasm_memory_type.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_type.restype = ctypes.POINTER(wasm_memorytype_t) +_wasm_memory_type.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_type(arg0: Any) -> ctypes._Pointer: return _wasm_memory_type(arg0) # type: ignore _wasm_memory_data = dll.wasm_memory_data -_wasm_memory_data.restype = POINTER(c_ubyte) -_wasm_memory_data.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_data.restype = ctypes.POINTER(ctypes.c_ubyte) +_wasm_memory_data.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_data(arg0: Any) -> ctypes._Pointer: return _wasm_memory_data(arg0) # type: ignore _wasm_memory_data_size = dll.wasm_memory_data_size -_wasm_memory_data_size.restype = c_size_t -_wasm_memory_data_size.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_data_size.restype = ctypes.c_size_t +_wasm_memory_data_size.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_data_size(arg0: Any) -> int: return _wasm_memory_data_size(arg0) # type: ignore _wasm_memory_size = dll.wasm_memory_size _wasm_memory_size.restype = wasm_memory_pages_t -_wasm_memory_size.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_size.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_size(arg0: Any) -> int: return _wasm_memory_size(arg0) # type: ignore _wasm_memory_grow = dll.wasm_memory_grow -_wasm_memory_grow.restype = c_bool -_wasm_memory_grow.argtypes = [POINTER(wasm_memory_t), wasm_memory_pages_t] +_wasm_memory_grow.restype = ctypes.c_bool +_wasm_memory_grow.argtypes = [ctypes.POINTER(wasm_memory_t), wasm_memory_pages_t] def wasm_memory_grow(arg0: Any, delta: Any) -> bool: return _wasm_memory_grow(arg0, delta) # type: ignore -class wasm_extern_t(Structure): +class wasm_extern_t(ctypes.Structure): pass _wasm_extern_delete = dll.wasm_extern_delete _wasm_extern_delete.restype = None -_wasm_extern_delete.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_delete.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_delete(arg0: Any) -> None: return _wasm_extern_delete(arg0) # type: ignore _wasm_extern_copy = dll.wasm_extern_copy -_wasm_extern_copy.restype = POINTER(wasm_extern_t) -_wasm_extern_copy.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_copy.restype = ctypes.POINTER(wasm_extern_t) +_wasm_extern_copy.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_copy(arg0: Any) -> ctypes._Pointer: return _wasm_extern_copy(arg0) # type: ignore _wasm_extern_same = dll.wasm_extern_same -_wasm_extern_same.restype = c_bool -_wasm_extern_same.argtypes = [POINTER(wasm_extern_t), POINTER(wasm_extern_t)] +_wasm_extern_same.restype = ctypes.c_bool +_wasm_extern_same.argtypes = [ctypes.POINTER(wasm_extern_t), ctypes.POINTER(wasm_extern_t)] def wasm_extern_same(arg0: Any, arg1: Any) -> bool: return _wasm_extern_same(arg0, arg1) # type: ignore _wasm_extern_get_host_info = dll.wasm_extern_get_host_info -_wasm_extern_get_host_info.restype = c_void_p -_wasm_extern_get_host_info.argtypes = [POINTER(wasm_extern_t)] -def wasm_extern_get_host_info(arg0: Any) -> int: +_wasm_extern_get_host_info.restype = ctypes.c_void_p +_wasm_extern_get_host_info.argtypes = [ctypes.POINTER(wasm_extern_t)] +def wasm_extern_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_extern_get_host_info(arg0) # type: ignore _wasm_extern_set_host_info = dll.wasm_extern_set_host_info _wasm_extern_set_host_info.restype = None -_wasm_extern_set_host_info.argtypes = [POINTER(wasm_extern_t), c_void_p] +_wasm_extern_set_host_info.argtypes = [ctypes.POINTER(wasm_extern_t), ctypes.c_void_p] def wasm_extern_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_extern_set_host_info(arg0, arg1) # type: ignore _wasm_extern_set_host_info_with_finalizer = dll.wasm_extern_set_host_info_with_finalizer _wasm_extern_set_host_info_with_finalizer.restype = None -_wasm_extern_set_host_info_with_finalizer.argtypes = [POINTER(wasm_extern_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_extern_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_extern_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_extern_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_extern_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore _wasm_extern_as_ref = dll.wasm_extern_as_ref -_wasm_extern_as_ref.restype = POINTER(wasm_ref_t) -_wasm_extern_as_ref.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_ref.restype = ctypes.POINTER(wasm_ref_t) +_wasm_extern_as_ref.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_ref(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_ref(arg0) # type: ignore _wasm_ref_as_extern = dll.wasm_ref_as_extern -_wasm_ref_as_extern.restype = POINTER(wasm_extern_t) -_wasm_ref_as_extern.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_extern.restype = ctypes.POINTER(wasm_extern_t) +_wasm_ref_as_extern.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_extern(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_extern(arg0) # type: ignore _wasm_extern_as_ref_const = dll.wasm_extern_as_ref_const -_wasm_extern_as_ref_const.restype = POINTER(wasm_ref_t) -_wasm_extern_as_ref_const.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_ref_const.restype = ctypes.POINTER(wasm_ref_t) +_wasm_extern_as_ref_const.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_ref_const(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_ref_const(arg0) # type: ignore _wasm_ref_as_extern_const = dll.wasm_ref_as_extern_const -_wasm_ref_as_extern_const.restype = POINTER(wasm_extern_t) -_wasm_ref_as_extern_const.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_extern_const.restype = ctypes.POINTER(wasm_extern_t) +_wasm_ref_as_extern_const.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_extern_const(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_extern_const(arg0) # type: ignore -class wasm_extern_vec_t(Structure): +class wasm_extern_vec_t(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(POINTER(wasm_extern_t))), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(ctypes.POINTER(wasm_extern_t))), ] size: int data: ctypes._Pointer _wasm_extern_vec_new_empty = dll.wasm_extern_vec_new_empty _wasm_extern_vec_new_empty.restype = None -_wasm_extern_vec_new_empty.argtypes = [POINTER(wasm_extern_vec_t)] +_wasm_extern_vec_new_empty.argtypes = [ctypes.POINTER(wasm_extern_vec_t)] def wasm_extern_vec_new_empty(out: Any) -> None: return _wasm_extern_vec_new_empty(out) # type: ignore _wasm_extern_vec_new_uninitialized = dll.wasm_extern_vec_new_uninitialized _wasm_extern_vec_new_uninitialized.restype = None -_wasm_extern_vec_new_uninitialized.argtypes = [POINTER(wasm_extern_vec_t), c_size_t] +_wasm_extern_vec_new_uninitialized.argtypes = [ctypes.POINTER(wasm_extern_vec_t), ctypes.c_size_t] def wasm_extern_vec_new_uninitialized(out: Any, arg1: Any) -> None: return _wasm_extern_vec_new_uninitialized(out, arg1) # type: ignore _wasm_extern_vec_new = dll.wasm_extern_vec_new _wasm_extern_vec_new.restype = None -_wasm_extern_vec_new.argtypes = [POINTER(wasm_extern_vec_t), c_size_t, POINTER(POINTER(wasm_extern_t))] +_wasm_extern_vec_new.argtypes = [ctypes.POINTER(wasm_extern_vec_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_extern_t))] def wasm_extern_vec_new(out: Any, arg1: Any, arg2: Any) -> None: return _wasm_extern_vec_new(out, arg1, arg2) # type: ignore _wasm_extern_vec_copy = dll.wasm_extern_vec_copy _wasm_extern_vec_copy.restype = None -_wasm_extern_vec_copy.argtypes = [POINTER(wasm_extern_vec_t), POINTER(wasm_extern_vec_t)] +_wasm_extern_vec_copy.argtypes = [ctypes.POINTER(wasm_extern_vec_t), ctypes.POINTER(wasm_extern_vec_t)] def wasm_extern_vec_copy(out: Any, arg1: Any) -> None: return _wasm_extern_vec_copy(out, arg1) # type: ignore _wasm_extern_vec_delete = dll.wasm_extern_vec_delete _wasm_extern_vec_delete.restype = None -_wasm_extern_vec_delete.argtypes = [POINTER(wasm_extern_vec_t)] +_wasm_extern_vec_delete.argtypes = [ctypes.POINTER(wasm_extern_vec_t)] def wasm_extern_vec_delete(arg0: Any) -> None: return _wasm_extern_vec_delete(arg0) # type: ignore _wasm_extern_kind = dll.wasm_extern_kind _wasm_extern_kind.restype = wasm_externkind_t -_wasm_extern_kind.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_kind.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_kind(arg0: Any) -> wasm_externkind_t: return _wasm_extern_kind(arg0) # type: ignore _wasm_extern_type = dll.wasm_extern_type -_wasm_extern_type.restype = POINTER(wasm_externtype_t) -_wasm_extern_type.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_type.restype = ctypes.POINTER(wasm_externtype_t) +_wasm_extern_type.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_type(arg0: Any) -> ctypes._Pointer: return _wasm_extern_type(arg0) # type: ignore _wasm_func_as_extern = dll.wasm_func_as_extern -_wasm_func_as_extern.restype = POINTER(wasm_extern_t) -_wasm_func_as_extern.argtypes = [POINTER(wasm_func_t)] +_wasm_func_as_extern.restype = ctypes.POINTER(wasm_extern_t) +_wasm_func_as_extern.argtypes = [ctypes.POINTER(wasm_func_t)] def wasm_func_as_extern(arg0: Any) -> ctypes._Pointer: return _wasm_func_as_extern(arg0) # type: ignore _wasm_global_as_extern = dll.wasm_global_as_extern -_wasm_global_as_extern.restype = POINTER(wasm_extern_t) -_wasm_global_as_extern.argtypes = [POINTER(wasm_global_t)] +_wasm_global_as_extern.restype = ctypes.POINTER(wasm_extern_t) +_wasm_global_as_extern.argtypes = [ctypes.POINTER(wasm_global_t)] def wasm_global_as_extern(arg0: Any) -> ctypes._Pointer: return _wasm_global_as_extern(arg0) # type: ignore _wasm_table_as_extern = dll.wasm_table_as_extern -_wasm_table_as_extern.restype = POINTER(wasm_extern_t) -_wasm_table_as_extern.argtypes = [POINTER(wasm_table_t)] +_wasm_table_as_extern.restype = ctypes.POINTER(wasm_extern_t) +_wasm_table_as_extern.argtypes = [ctypes.POINTER(wasm_table_t)] def wasm_table_as_extern(arg0: Any) -> ctypes._Pointer: return _wasm_table_as_extern(arg0) # type: ignore _wasm_memory_as_extern = dll.wasm_memory_as_extern -_wasm_memory_as_extern.restype = POINTER(wasm_extern_t) -_wasm_memory_as_extern.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_as_extern.restype = ctypes.POINTER(wasm_extern_t) +_wasm_memory_as_extern.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_as_extern(arg0: Any) -> ctypes._Pointer: return _wasm_memory_as_extern(arg0) # type: ignore _wasm_extern_as_func = dll.wasm_extern_as_func -_wasm_extern_as_func.restype = POINTER(wasm_func_t) -_wasm_extern_as_func.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_func.restype = ctypes.POINTER(wasm_func_t) +_wasm_extern_as_func.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_func(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_func(arg0) # type: ignore _wasm_extern_as_global = dll.wasm_extern_as_global -_wasm_extern_as_global.restype = POINTER(wasm_global_t) -_wasm_extern_as_global.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_global.restype = ctypes.POINTER(wasm_global_t) +_wasm_extern_as_global.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_global(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_global(arg0) # type: ignore _wasm_extern_as_table = dll.wasm_extern_as_table -_wasm_extern_as_table.restype = POINTER(wasm_table_t) -_wasm_extern_as_table.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_table.restype = ctypes.POINTER(wasm_table_t) +_wasm_extern_as_table.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_table(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_table(arg0) # type: ignore _wasm_extern_as_memory = dll.wasm_extern_as_memory -_wasm_extern_as_memory.restype = POINTER(wasm_memory_t) -_wasm_extern_as_memory.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_memory.restype = ctypes.POINTER(wasm_memory_t) +_wasm_extern_as_memory.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_memory(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_memory(arg0) # type: ignore _wasm_func_as_extern_const = dll.wasm_func_as_extern_const -_wasm_func_as_extern_const.restype = POINTER(wasm_extern_t) -_wasm_func_as_extern_const.argtypes = [POINTER(wasm_func_t)] +_wasm_func_as_extern_const.restype = ctypes.POINTER(wasm_extern_t) +_wasm_func_as_extern_const.argtypes = [ctypes.POINTER(wasm_func_t)] def wasm_func_as_extern_const(arg0: Any) -> ctypes._Pointer: return _wasm_func_as_extern_const(arg0) # type: ignore _wasm_global_as_extern_const = dll.wasm_global_as_extern_const -_wasm_global_as_extern_const.restype = POINTER(wasm_extern_t) -_wasm_global_as_extern_const.argtypes = [POINTER(wasm_global_t)] +_wasm_global_as_extern_const.restype = ctypes.POINTER(wasm_extern_t) +_wasm_global_as_extern_const.argtypes = [ctypes.POINTER(wasm_global_t)] def wasm_global_as_extern_const(arg0: Any) -> ctypes._Pointer: return _wasm_global_as_extern_const(arg0) # type: ignore _wasm_table_as_extern_const = dll.wasm_table_as_extern_const -_wasm_table_as_extern_const.restype = POINTER(wasm_extern_t) -_wasm_table_as_extern_const.argtypes = [POINTER(wasm_table_t)] +_wasm_table_as_extern_const.restype = ctypes.POINTER(wasm_extern_t) +_wasm_table_as_extern_const.argtypes = [ctypes.POINTER(wasm_table_t)] def wasm_table_as_extern_const(arg0: Any) -> ctypes._Pointer: return _wasm_table_as_extern_const(arg0) # type: ignore _wasm_memory_as_extern_const = dll.wasm_memory_as_extern_const -_wasm_memory_as_extern_const.restype = POINTER(wasm_extern_t) -_wasm_memory_as_extern_const.argtypes = [POINTER(wasm_memory_t)] +_wasm_memory_as_extern_const.restype = ctypes.POINTER(wasm_extern_t) +_wasm_memory_as_extern_const.argtypes = [ctypes.POINTER(wasm_memory_t)] def wasm_memory_as_extern_const(arg0: Any) -> ctypes._Pointer: return _wasm_memory_as_extern_const(arg0) # type: ignore _wasm_extern_as_func_const = dll.wasm_extern_as_func_const -_wasm_extern_as_func_const.restype = POINTER(wasm_func_t) -_wasm_extern_as_func_const.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_func_const.restype = ctypes.POINTER(wasm_func_t) +_wasm_extern_as_func_const.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_func_const(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_func_const(arg0) # type: ignore _wasm_extern_as_global_const = dll.wasm_extern_as_global_const -_wasm_extern_as_global_const.restype = POINTER(wasm_global_t) -_wasm_extern_as_global_const.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_global_const.restype = ctypes.POINTER(wasm_global_t) +_wasm_extern_as_global_const.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_global_const(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_global_const(arg0) # type: ignore _wasm_extern_as_table_const = dll.wasm_extern_as_table_const -_wasm_extern_as_table_const.restype = POINTER(wasm_table_t) -_wasm_extern_as_table_const.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_table_const.restype = ctypes.POINTER(wasm_table_t) +_wasm_extern_as_table_const.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_table_const(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_table_const(arg0) # type: ignore _wasm_extern_as_memory_const = dll.wasm_extern_as_memory_const -_wasm_extern_as_memory_const.restype = POINTER(wasm_memory_t) -_wasm_extern_as_memory_const.argtypes = [POINTER(wasm_extern_t)] +_wasm_extern_as_memory_const.restype = ctypes.POINTER(wasm_memory_t) +_wasm_extern_as_memory_const.argtypes = [ctypes.POINTER(wasm_extern_t)] def wasm_extern_as_memory_const(arg0: Any) -> ctypes._Pointer: return _wasm_extern_as_memory_const(arg0) # type: ignore -class wasm_instance_t(Structure): +class wasm_instance_t(ctypes.Structure): pass _wasm_instance_delete = dll.wasm_instance_delete _wasm_instance_delete.restype = None -_wasm_instance_delete.argtypes = [POINTER(wasm_instance_t)] +_wasm_instance_delete.argtypes = [ctypes.POINTER(wasm_instance_t)] def wasm_instance_delete(arg0: Any) -> None: return _wasm_instance_delete(arg0) # type: ignore _wasm_instance_copy = dll.wasm_instance_copy -_wasm_instance_copy.restype = POINTER(wasm_instance_t) -_wasm_instance_copy.argtypes = [POINTER(wasm_instance_t)] +_wasm_instance_copy.restype = ctypes.POINTER(wasm_instance_t) +_wasm_instance_copy.argtypes = [ctypes.POINTER(wasm_instance_t)] def wasm_instance_copy(arg0: Any) -> ctypes._Pointer: return _wasm_instance_copy(arg0) # type: ignore _wasm_instance_same = dll.wasm_instance_same -_wasm_instance_same.restype = c_bool -_wasm_instance_same.argtypes = [POINTER(wasm_instance_t), POINTER(wasm_instance_t)] +_wasm_instance_same.restype = ctypes.c_bool +_wasm_instance_same.argtypes = [ctypes.POINTER(wasm_instance_t), ctypes.POINTER(wasm_instance_t)] def wasm_instance_same(arg0: Any, arg1: Any) -> bool: return _wasm_instance_same(arg0, arg1) # type: ignore _wasm_instance_get_host_info = dll.wasm_instance_get_host_info -_wasm_instance_get_host_info.restype = c_void_p -_wasm_instance_get_host_info.argtypes = [POINTER(wasm_instance_t)] -def wasm_instance_get_host_info(arg0: Any) -> int: +_wasm_instance_get_host_info.restype = ctypes.c_void_p +_wasm_instance_get_host_info.argtypes = [ctypes.POINTER(wasm_instance_t)] +def wasm_instance_get_host_info(arg0: Any) -> ctypes._Pointer: return _wasm_instance_get_host_info(arg0) # type: ignore _wasm_instance_set_host_info = dll.wasm_instance_set_host_info _wasm_instance_set_host_info.restype = None -_wasm_instance_set_host_info.argtypes = [POINTER(wasm_instance_t), c_void_p] +_wasm_instance_set_host_info.argtypes = [ctypes.POINTER(wasm_instance_t), ctypes.c_void_p] def wasm_instance_set_host_info(arg0: Any, arg1: Any) -> None: return _wasm_instance_set_host_info(arg0, arg1) # type: ignore _wasm_instance_set_host_info_with_finalizer = dll.wasm_instance_set_host_info_with_finalizer _wasm_instance_set_host_info_with_finalizer.restype = None -_wasm_instance_set_host_info_with_finalizer.argtypes = [POINTER(wasm_instance_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasm_instance_set_host_info_with_finalizer.argtypes = [ctypes.POINTER(wasm_instance_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasm_instance_set_host_info_with_finalizer(arg0: Any, arg1: Any, arg2: Any) -> None: return _wasm_instance_set_host_info_with_finalizer(arg0, arg1, arg2) # type: ignore _wasm_instance_as_ref = dll.wasm_instance_as_ref -_wasm_instance_as_ref.restype = POINTER(wasm_ref_t) -_wasm_instance_as_ref.argtypes = [POINTER(wasm_instance_t)] +_wasm_instance_as_ref.restype = ctypes.POINTER(wasm_ref_t) +_wasm_instance_as_ref.argtypes = [ctypes.POINTER(wasm_instance_t)] def wasm_instance_as_ref(arg0: Any) -> ctypes._Pointer: return _wasm_instance_as_ref(arg0) # type: ignore _wasm_ref_as_instance = dll.wasm_ref_as_instance -_wasm_ref_as_instance.restype = POINTER(wasm_instance_t) -_wasm_ref_as_instance.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_instance.restype = ctypes.POINTER(wasm_instance_t) +_wasm_ref_as_instance.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_instance(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_instance(arg0) # type: ignore _wasm_instance_as_ref_const = dll.wasm_instance_as_ref_const -_wasm_instance_as_ref_const.restype = POINTER(wasm_ref_t) -_wasm_instance_as_ref_const.argtypes = [POINTER(wasm_instance_t)] +_wasm_instance_as_ref_const.restype = ctypes.POINTER(wasm_ref_t) +_wasm_instance_as_ref_const.argtypes = [ctypes.POINTER(wasm_instance_t)] def wasm_instance_as_ref_const(arg0: Any) -> ctypes._Pointer: return _wasm_instance_as_ref_const(arg0) # type: ignore _wasm_ref_as_instance_const = dll.wasm_ref_as_instance_const -_wasm_ref_as_instance_const.restype = POINTER(wasm_instance_t) -_wasm_ref_as_instance_const.argtypes = [POINTER(wasm_ref_t)] +_wasm_ref_as_instance_const.restype = ctypes.POINTER(wasm_instance_t) +_wasm_ref_as_instance_const.argtypes = [ctypes.POINTER(wasm_ref_t)] def wasm_ref_as_instance_const(arg0: Any) -> ctypes._Pointer: return _wasm_ref_as_instance_const(arg0) # type: ignore _wasm_instance_new = dll.wasm_instance_new -_wasm_instance_new.restype = POINTER(wasm_instance_t) -_wasm_instance_new.argtypes = [POINTER(wasm_store_t), POINTER(wasm_module_t), POINTER(wasm_extern_vec_t), POINTER(POINTER(wasm_trap_t))] +_wasm_instance_new.restype = ctypes.POINTER(wasm_instance_t) +_wasm_instance_new.argtypes = [ctypes.POINTER(wasm_store_t), ctypes.POINTER(wasm_module_t), ctypes.POINTER(wasm_extern_vec_t), ctypes.POINTER(ctypes.POINTER(wasm_trap_t))] def wasm_instance_new(arg0: Any, arg1: Any, imports: Any, arg3: Any) -> ctypes._Pointer: return _wasm_instance_new(arg0, arg1, imports, arg3) # type: ignore _wasm_instance_exports = dll.wasm_instance_exports _wasm_instance_exports.restype = None -_wasm_instance_exports.argtypes = [POINTER(wasm_instance_t), POINTER(wasm_extern_vec_t)] +_wasm_instance_exports.argtypes = [ctypes.POINTER(wasm_instance_t), ctypes.POINTER(wasm_extern_vec_t)] def wasm_instance_exports(arg0: Any, out: Any) -> None: return _wasm_instance_exports(arg0, out) # type: ignore -class wasi_config_t(Structure): +class wasi_config_t(ctypes.Structure): pass _wasi_config_delete = dll.wasi_config_delete _wasi_config_delete.restype = None -_wasi_config_delete.argtypes = [POINTER(wasi_config_t)] +_wasi_config_delete.argtypes = [ctypes.POINTER(wasi_config_t)] def wasi_config_delete(arg0: Any) -> None: return _wasi_config_delete(arg0) # type: ignore _wasi_config_new = dll.wasi_config_new -_wasi_config_new.restype = POINTER(wasi_config_t) +_wasi_config_new.restype = ctypes.POINTER(wasi_config_t) _wasi_config_new.argtypes = [] def wasi_config_new() -> ctypes._Pointer: return _wasi_config_new() # type: ignore _wasi_config_set_argv = dll.wasi_config_set_argv -_wasi_config_set_argv.restype = c_bool -_wasi_config_set_argv.argtypes = [POINTER(wasi_config_t), c_size_t, POINTER(POINTER(c_char))] +_wasi_config_set_argv.restype = ctypes.c_bool +_wasi_config_set_argv.argtypes = [ctypes.POINTER(wasi_config_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char))] def wasi_config_set_argv(config: Any, argc: Any, argv: Any) -> bool: return _wasi_config_set_argv(config, argc, argv) # type: ignore _wasi_config_inherit_argv = dll.wasi_config_inherit_argv _wasi_config_inherit_argv.restype = None -_wasi_config_inherit_argv.argtypes = [POINTER(wasi_config_t)] +_wasi_config_inherit_argv.argtypes = [ctypes.POINTER(wasi_config_t)] def wasi_config_inherit_argv(config: Any) -> None: return _wasi_config_inherit_argv(config) # type: ignore _wasi_config_set_env = dll.wasi_config_set_env -_wasi_config_set_env.restype = c_bool -_wasi_config_set_env.argtypes = [POINTER(wasi_config_t), c_size_t, POINTER(POINTER(c_char)), POINTER(POINTER(c_char))] +_wasi_config_set_env.restype = ctypes.c_bool +_wasi_config_set_env.argtypes = [ctypes.POINTER(wasi_config_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.POINTER(ctypes.c_char))] def wasi_config_set_env(config: Any, envc: Any, names: Any, values: Any) -> bool: return _wasi_config_set_env(config, envc, names, values) # type: ignore _wasi_config_inherit_env = dll.wasi_config_inherit_env _wasi_config_inherit_env.restype = None -_wasi_config_inherit_env.argtypes = [POINTER(wasi_config_t)] +_wasi_config_inherit_env.argtypes = [ctypes.POINTER(wasi_config_t)] def wasi_config_inherit_env(config: Any) -> None: return _wasi_config_inherit_env(config) # type: ignore _wasi_config_set_stdin_file = dll.wasi_config_set_stdin_file -_wasi_config_set_stdin_file.restype = c_bool -_wasi_config_set_stdin_file.argtypes = [POINTER(wasi_config_t), POINTER(c_char)] +_wasi_config_set_stdin_file.restype = ctypes.c_bool +_wasi_config_set_stdin_file.argtypes = [ctypes.POINTER(wasi_config_t), ctypes.POINTER(ctypes.c_char)] def wasi_config_set_stdin_file(config: Any, path: Any) -> bool: return _wasi_config_set_stdin_file(config, path) # type: ignore _wasi_config_set_stdin_bytes = dll.wasi_config_set_stdin_bytes _wasi_config_set_stdin_bytes.restype = None -_wasi_config_set_stdin_bytes.argtypes = [POINTER(wasi_config_t), POINTER(wasm_byte_vec_t)] +_wasi_config_set_stdin_bytes.argtypes = [ctypes.POINTER(wasi_config_t), ctypes.POINTER(wasm_byte_vec_t)] def wasi_config_set_stdin_bytes(config: Any, binary: Any) -> None: return _wasi_config_set_stdin_bytes(config, binary) # type: ignore _wasi_config_inherit_stdin = dll.wasi_config_inherit_stdin _wasi_config_inherit_stdin.restype = None -_wasi_config_inherit_stdin.argtypes = [POINTER(wasi_config_t)] +_wasi_config_inherit_stdin.argtypes = [ctypes.POINTER(wasi_config_t)] def wasi_config_inherit_stdin(config: Any) -> None: return _wasi_config_inherit_stdin(config) # type: ignore _wasi_config_set_stdout_file = dll.wasi_config_set_stdout_file -_wasi_config_set_stdout_file.restype = c_bool -_wasi_config_set_stdout_file.argtypes = [POINTER(wasi_config_t), POINTER(c_char)] +_wasi_config_set_stdout_file.restype = ctypes.c_bool +_wasi_config_set_stdout_file.argtypes = [ctypes.POINTER(wasi_config_t), ctypes.POINTER(ctypes.c_char)] def wasi_config_set_stdout_file(config: Any, path: Any) -> bool: return _wasi_config_set_stdout_file(config, path) # type: ignore _wasi_config_inherit_stdout = dll.wasi_config_inherit_stdout _wasi_config_inherit_stdout.restype = None -_wasi_config_inherit_stdout.argtypes = [POINTER(wasi_config_t)] +_wasi_config_inherit_stdout.argtypes = [ctypes.POINTER(wasi_config_t)] def wasi_config_inherit_stdout(config: Any) -> None: return _wasi_config_inherit_stdout(config) # type: ignore _wasi_config_set_stdout_custom = dll.wasi_config_set_stdout_custom _wasi_config_set_stdout_custom.restype = None -_wasi_config_set_stdout_custom.argtypes = [POINTER(wasi_config_t), CFUNCTYPE(c_ssize_t, c_void_p, POINTER(c_ubyte), c_size_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasi_config_set_stdout_custom.argtypes = [ctypes.POINTER(wasi_config_t), ctypes.CFUNCTYPE(ctypes.c_ssize_t, ctypes.c_void_p, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_size_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasi_config_set_stdout_custom(config: Any, callback: Any, data: Any, finalizer: Any) -> None: return _wasi_config_set_stdout_custom(config, callback, data, finalizer) # type: ignore _wasi_config_set_stderr_file = dll.wasi_config_set_stderr_file -_wasi_config_set_stderr_file.restype = c_bool -_wasi_config_set_stderr_file.argtypes = [POINTER(wasi_config_t), POINTER(c_char)] +_wasi_config_set_stderr_file.restype = ctypes.c_bool +_wasi_config_set_stderr_file.argtypes = [ctypes.POINTER(wasi_config_t), ctypes.POINTER(ctypes.c_char)] def wasi_config_set_stderr_file(config: Any, path: Any) -> bool: return _wasi_config_set_stderr_file(config, path) # type: ignore _wasi_config_inherit_stderr = dll.wasi_config_inherit_stderr _wasi_config_inherit_stderr.restype = None -_wasi_config_inherit_stderr.argtypes = [POINTER(wasi_config_t)] +_wasi_config_inherit_stderr.argtypes = [ctypes.POINTER(wasi_config_t)] def wasi_config_inherit_stderr(config: Any) -> None: return _wasi_config_inherit_stderr(config) # type: ignore _wasi_config_set_stderr_custom = dll.wasi_config_set_stderr_custom _wasi_config_set_stderr_custom.restype = None -_wasi_config_set_stderr_custom.argtypes = [POINTER(wasi_config_t), CFUNCTYPE(c_ssize_t, c_void_p, POINTER(c_ubyte), c_size_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasi_config_set_stderr_custom.argtypes = [ctypes.POINTER(wasi_config_t), ctypes.CFUNCTYPE(ctypes.c_ssize_t, ctypes.c_void_p, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_size_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasi_config_set_stderr_custom(config: Any, callback: Any, data: Any, finalizer: Any) -> None: return _wasi_config_set_stderr_custom(config, callback, data, finalizer) # type: ignore @@ -1988,69 +1987,69 @@ class wasi_dir_perms_flags(Enum): WASMTIME_WASI_DIR_PERMS_READ = 1 WASMTIME_WASI_DIR_PERMS_WRITE = 2 -wasi_dir_perms = c_size_t +wasi_dir_perms = ctypes.c_size_t class wasi_file_perms_flags(Enum): WASMTIME_WASI_FILE_PERMS_READ = 1 WASMTIME_WASI_FILE_PERMS_WRITE = 2 -wasi_file_perms = c_size_t +wasi_file_perms = ctypes.c_size_t _wasi_config_preopen_dir = dll.wasi_config_preopen_dir -_wasi_config_preopen_dir.restype = c_bool -_wasi_config_preopen_dir.argtypes = [POINTER(wasi_config_t), POINTER(c_char), POINTER(c_char), wasi_dir_perms, wasi_file_perms] +_wasi_config_preopen_dir.restype = ctypes.c_bool +_wasi_config_preopen_dir.argtypes = [ctypes.POINTER(wasi_config_t), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char), wasi_dir_perms, wasi_file_perms] def wasi_config_preopen_dir(config: Any, host_path: Any, guest_path: Any, dir_perms: Any, file_perms: Any) -> bool: return _wasi_config_preopen_dir(config, host_path, guest_path, dir_perms, file_perms) # type: ignore -class wasmtime_error(Structure): +class wasmtime_error(ctypes.Structure): pass wasmtime_error_t = wasmtime_error _wasmtime_error_new = dll.wasmtime_error_new -_wasmtime_error_new.restype = POINTER(wasmtime_error_t) -_wasmtime_error_new.argtypes = [POINTER(c_char)] +_wasmtime_error_new.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_error_new.argtypes = [ctypes.POINTER(ctypes.c_char)] def wasmtime_error_new(arg0: Any) -> ctypes._Pointer: return _wasmtime_error_new(arg0) # type: ignore _wasmtime_error_delete = dll.wasmtime_error_delete _wasmtime_error_delete.restype = None -_wasmtime_error_delete.argtypes = [POINTER(wasmtime_error_t)] +_wasmtime_error_delete.argtypes = [ctypes.POINTER(wasmtime_error_t)] def wasmtime_error_delete(error: Any) -> None: return _wasmtime_error_delete(error) # type: ignore _wasmtime_error_message = dll.wasmtime_error_message _wasmtime_error_message.restype = None -_wasmtime_error_message.argtypes = [POINTER(wasmtime_error_t), POINTER(wasm_name_t)] +_wasmtime_error_message.argtypes = [ctypes.POINTER(wasmtime_error_t), ctypes.POINTER(wasm_name_t)] def wasmtime_error_message(error: Any, message: Any) -> None: return _wasmtime_error_message(error, message) # type: ignore _wasmtime_error_exit_status = dll.wasmtime_error_exit_status -_wasmtime_error_exit_status.restype = c_bool -_wasmtime_error_exit_status.argtypes = [POINTER(wasmtime_error_t), POINTER(c_int)] +_wasmtime_error_exit_status.restype = ctypes.c_bool +_wasmtime_error_exit_status.argtypes = [ctypes.POINTER(wasmtime_error_t), ctypes.POINTER(ctypes.c_int)] def wasmtime_error_exit_status(arg0: Any, status: Any) -> bool: return _wasmtime_error_exit_status(arg0, status) # type: ignore _wasmtime_error_wasm_trace = dll.wasmtime_error_wasm_trace _wasmtime_error_wasm_trace.restype = None -_wasmtime_error_wasm_trace.argtypes = [POINTER(wasmtime_error_t), POINTER(wasm_frame_vec_t)] +_wasmtime_error_wasm_trace.argtypes = [ctypes.POINTER(wasmtime_error_t), ctypes.POINTER(wasm_frame_vec_t)] def wasmtime_error_wasm_trace(arg0: Any, out: Any) -> None: return _wasmtime_error_wasm_trace(arg0, out) # type: ignore -wasmtime_strategy_t = c_uint8 +wasmtime_strategy_t = ctypes.c_uint8 class wasmtime_strategy_enum(Enum): WASMTIME_STRATEGY_AUTO = auto() WASMTIME_STRATEGY_CRANELIFT = auto() -wasmtime_opt_level_t = c_uint8 +wasmtime_opt_level_t = ctypes.c_uint8 class wasmtime_opt_level_enum(Enum): WASMTIME_OPT_LEVEL_NONE = auto() WASMTIME_OPT_LEVEL_SPEED = auto() WASMTIME_OPT_LEVEL_SPEED_AND_SIZE = auto() -wasmtime_profiling_strategy_t = c_uint8 +wasmtime_profiling_strategy_t = ctypes.c_uint8 class wasmtime_profiling_strategy_enum(Enum): WASMTIME_PROFILING_STRATEGY_NONE = auto() @@ -2060,236 +2059,236 @@ class wasmtime_profiling_strategy_enum(Enum): _wasmtime_config_debug_info_set = dll.wasmtime_config_debug_info_set _wasmtime_config_debug_info_set.restype = None -_wasmtime_config_debug_info_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_debug_info_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_debug_info_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_debug_info_set(arg0, arg1) # type: ignore _wasmtime_config_consume_fuel_set = dll.wasmtime_config_consume_fuel_set _wasmtime_config_consume_fuel_set.restype = None -_wasmtime_config_consume_fuel_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_consume_fuel_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_consume_fuel_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_consume_fuel_set(arg0, arg1) # type: ignore _wasmtime_config_epoch_interruption_set = dll.wasmtime_config_epoch_interruption_set _wasmtime_config_epoch_interruption_set.restype = None -_wasmtime_config_epoch_interruption_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_epoch_interruption_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_epoch_interruption_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_epoch_interruption_set(arg0, arg1) # type: ignore _wasmtime_config_max_wasm_stack_set = dll.wasmtime_config_max_wasm_stack_set _wasmtime_config_max_wasm_stack_set.restype = None -_wasmtime_config_max_wasm_stack_set.argtypes = [POINTER(wasm_config_t), c_size_t] +_wasmtime_config_max_wasm_stack_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_size_t] def wasmtime_config_max_wasm_stack_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_max_wasm_stack_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_threads_set = dll.wasmtime_config_wasm_threads_set _wasmtime_config_wasm_threads_set.restype = None -_wasmtime_config_wasm_threads_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_threads_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_threads_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_threads_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_tail_call_set = dll.wasmtime_config_wasm_tail_call_set _wasmtime_config_wasm_tail_call_set.restype = None -_wasmtime_config_wasm_tail_call_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_tail_call_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_tail_call_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_tail_call_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_reference_types_set = dll.wasmtime_config_wasm_reference_types_set _wasmtime_config_wasm_reference_types_set.restype = None -_wasmtime_config_wasm_reference_types_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_reference_types_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_reference_types_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_reference_types_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_function_references_set = dll.wasmtime_config_wasm_function_references_set _wasmtime_config_wasm_function_references_set.restype = None -_wasmtime_config_wasm_function_references_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_function_references_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_function_references_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_function_references_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_gc_set = dll.wasmtime_config_wasm_gc_set _wasmtime_config_wasm_gc_set.restype = None -_wasmtime_config_wasm_gc_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_gc_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_gc_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_gc_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_simd_set = dll.wasmtime_config_wasm_simd_set _wasmtime_config_wasm_simd_set.restype = None -_wasmtime_config_wasm_simd_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_simd_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_simd_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_simd_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_relaxed_simd_set = dll.wasmtime_config_wasm_relaxed_simd_set _wasmtime_config_wasm_relaxed_simd_set.restype = None -_wasmtime_config_wasm_relaxed_simd_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_relaxed_simd_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_relaxed_simd_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_relaxed_simd_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_relaxed_simd_deterministic_set = dll.wasmtime_config_wasm_relaxed_simd_deterministic_set _wasmtime_config_wasm_relaxed_simd_deterministic_set.restype = None -_wasmtime_config_wasm_relaxed_simd_deterministic_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_relaxed_simd_deterministic_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_relaxed_simd_deterministic_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_relaxed_simd_deterministic_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_bulk_memory_set = dll.wasmtime_config_wasm_bulk_memory_set _wasmtime_config_wasm_bulk_memory_set.restype = None -_wasmtime_config_wasm_bulk_memory_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_bulk_memory_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_bulk_memory_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_bulk_memory_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_multi_value_set = dll.wasmtime_config_wasm_multi_value_set _wasmtime_config_wasm_multi_value_set.restype = None -_wasmtime_config_wasm_multi_value_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_multi_value_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_multi_value_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_multi_value_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_multi_memory_set = dll.wasmtime_config_wasm_multi_memory_set _wasmtime_config_wasm_multi_memory_set.restype = None -_wasmtime_config_wasm_multi_memory_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_multi_memory_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_multi_memory_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_multi_memory_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_memory64_set = dll.wasmtime_config_wasm_memory64_set _wasmtime_config_wasm_memory64_set.restype = None -_wasmtime_config_wasm_memory64_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_memory64_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_memory64_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_memory64_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_wide_arithmetic_set = dll.wasmtime_config_wasm_wide_arithmetic_set _wasmtime_config_wasm_wide_arithmetic_set.restype = None -_wasmtime_config_wasm_wide_arithmetic_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_wide_arithmetic_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_wide_arithmetic_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_wide_arithmetic_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_exceptions_set = dll.wasmtime_config_wasm_exceptions_set _wasmtime_config_wasm_exceptions_set.restype = None -_wasmtime_config_wasm_exceptions_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_exceptions_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_exceptions_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_exceptions_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_custom_page_sizes_set = dll.wasmtime_config_wasm_custom_page_sizes_set _wasmtime_config_wasm_custom_page_sizes_set.restype = None -_wasmtime_config_wasm_custom_page_sizes_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_custom_page_sizes_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_custom_page_sizes_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_custom_page_sizes_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_stack_switching_set = dll.wasmtime_config_wasm_stack_switching_set _wasmtime_config_wasm_stack_switching_set.restype = None -_wasmtime_config_wasm_stack_switching_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_stack_switching_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_stack_switching_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_stack_switching_set(arg0, arg1) # type: ignore _wasmtime_config_strategy_set = dll.wasmtime_config_strategy_set _wasmtime_config_strategy_set.restype = None -_wasmtime_config_strategy_set.argtypes = [POINTER(wasm_config_t), wasmtime_strategy_t] +_wasmtime_config_strategy_set.argtypes = [ctypes.POINTER(wasm_config_t), wasmtime_strategy_t] def wasmtime_config_strategy_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_strategy_set(arg0, arg1) # type: ignore _wasmtime_config_parallel_compilation_set = dll.wasmtime_config_parallel_compilation_set _wasmtime_config_parallel_compilation_set.restype = None -_wasmtime_config_parallel_compilation_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_parallel_compilation_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_parallel_compilation_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_parallel_compilation_set(arg0, arg1) # type: ignore _wasmtime_config_cranelift_debug_verifier_set = dll.wasmtime_config_cranelift_debug_verifier_set _wasmtime_config_cranelift_debug_verifier_set.restype = None -_wasmtime_config_cranelift_debug_verifier_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_cranelift_debug_verifier_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_cranelift_debug_verifier_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_cranelift_debug_verifier_set(arg0, arg1) # type: ignore _wasmtime_config_cranelift_nan_canonicalization_set = dll.wasmtime_config_cranelift_nan_canonicalization_set _wasmtime_config_cranelift_nan_canonicalization_set.restype = None -_wasmtime_config_cranelift_nan_canonicalization_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_cranelift_nan_canonicalization_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_cranelift_nan_canonicalization_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_cranelift_nan_canonicalization_set(arg0, arg1) # type: ignore _wasmtime_config_cranelift_opt_level_set = dll.wasmtime_config_cranelift_opt_level_set _wasmtime_config_cranelift_opt_level_set.restype = None -_wasmtime_config_cranelift_opt_level_set.argtypes = [POINTER(wasm_config_t), wasmtime_opt_level_t] +_wasmtime_config_cranelift_opt_level_set.argtypes = [ctypes.POINTER(wasm_config_t), wasmtime_opt_level_t] def wasmtime_config_cranelift_opt_level_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_cranelift_opt_level_set(arg0, arg1) # type: ignore _wasmtime_config_profiler_set = dll.wasmtime_config_profiler_set _wasmtime_config_profiler_set.restype = None -_wasmtime_config_profiler_set.argtypes = [POINTER(wasm_config_t), wasmtime_profiling_strategy_t] +_wasmtime_config_profiler_set.argtypes = [ctypes.POINTER(wasm_config_t), wasmtime_profiling_strategy_t] def wasmtime_config_profiler_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_profiler_set(arg0, arg1) # type: ignore _wasmtime_config_memory_may_move_set = dll.wasmtime_config_memory_may_move_set _wasmtime_config_memory_may_move_set.restype = None -_wasmtime_config_memory_may_move_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_memory_may_move_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_memory_may_move_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_memory_may_move_set(arg0, arg1) # type: ignore _wasmtime_config_memory_reservation_set = dll.wasmtime_config_memory_reservation_set _wasmtime_config_memory_reservation_set.restype = None -_wasmtime_config_memory_reservation_set.argtypes = [POINTER(wasm_config_t), c_uint64] +_wasmtime_config_memory_reservation_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_uint64] def wasmtime_config_memory_reservation_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_memory_reservation_set(arg0, arg1) # type: ignore _wasmtime_config_memory_guard_size_set = dll.wasmtime_config_memory_guard_size_set _wasmtime_config_memory_guard_size_set.restype = None -_wasmtime_config_memory_guard_size_set.argtypes = [POINTER(wasm_config_t), c_uint64] +_wasmtime_config_memory_guard_size_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_uint64] def wasmtime_config_memory_guard_size_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_memory_guard_size_set(arg0, arg1) # type: ignore _wasmtime_config_memory_reservation_for_growth_set = dll.wasmtime_config_memory_reservation_for_growth_set _wasmtime_config_memory_reservation_for_growth_set.restype = None -_wasmtime_config_memory_reservation_for_growth_set.argtypes = [POINTER(wasm_config_t), c_uint64] +_wasmtime_config_memory_reservation_for_growth_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_uint64] def wasmtime_config_memory_reservation_for_growth_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_memory_reservation_for_growth_set(arg0, arg1) # type: ignore _wasmtime_config_native_unwind_info_set = dll.wasmtime_config_native_unwind_info_set _wasmtime_config_native_unwind_info_set.restype = None -_wasmtime_config_native_unwind_info_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_native_unwind_info_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_native_unwind_info_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_native_unwind_info_set(arg0, arg1) # type: ignore _wasmtime_config_cache_config_load = dll.wasmtime_config_cache_config_load -_wasmtime_config_cache_config_load.restype = POINTER(wasmtime_error_t) -_wasmtime_config_cache_config_load.argtypes = [POINTER(wasm_config_t), POINTER(c_char)] +_wasmtime_config_cache_config_load.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_config_cache_config_load.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.POINTER(ctypes.c_char)] def wasmtime_config_cache_config_load(arg0: Any, arg1: Any) -> ctypes._Pointer: return _wasmtime_config_cache_config_load(arg0, arg1) # type: ignore _wasmtime_config_target_set = dll.wasmtime_config_target_set -_wasmtime_config_target_set.restype = POINTER(wasmtime_error_t) -_wasmtime_config_target_set.argtypes = [POINTER(wasm_config_t), POINTER(c_char)] +_wasmtime_config_target_set.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_config_target_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.POINTER(ctypes.c_char)] def wasmtime_config_target_set(arg0: Any, arg1: Any) -> ctypes._Pointer: return _wasmtime_config_target_set(arg0, arg1) # type: ignore _wasmtime_config_cranelift_flag_enable = dll.wasmtime_config_cranelift_flag_enable _wasmtime_config_cranelift_flag_enable.restype = None -_wasmtime_config_cranelift_flag_enable.argtypes = [POINTER(wasm_config_t), POINTER(c_char)] +_wasmtime_config_cranelift_flag_enable.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.POINTER(ctypes.c_char)] def wasmtime_config_cranelift_flag_enable(arg0: Any, arg1: Any) -> None: return _wasmtime_config_cranelift_flag_enable(arg0, arg1) # type: ignore _wasmtime_config_cranelift_flag_set = dll.wasmtime_config_cranelift_flag_set _wasmtime_config_cranelift_flag_set.restype = None -_wasmtime_config_cranelift_flag_set.argtypes = [POINTER(wasm_config_t), POINTER(c_char), POINTER(c_char)] +_wasmtime_config_cranelift_flag_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char)] def wasmtime_config_cranelift_flag_set(arg0: Any, key: Any, value: Any) -> None: return _wasmtime_config_cranelift_flag_set(arg0, key, value) # type: ignore _wasmtime_config_macos_use_mach_ports_set = dll.wasmtime_config_macos_use_mach_ports_set _wasmtime_config_macos_use_mach_ports_set.restype = None -_wasmtime_config_macos_use_mach_ports_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_macos_use_mach_ports_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_macos_use_mach_ports_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_macos_use_mach_ports_set(arg0, arg1) # type: ignore _wasmtime_config_signals_based_traps_set = dll.wasmtime_config_signals_based_traps_set _wasmtime_config_signals_based_traps_set.restype = None -_wasmtime_config_signals_based_traps_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_signals_based_traps_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_signals_based_traps_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_signals_based_traps_set(arg0, arg1) # type: ignore -wasmtime_memory_get_callback_t = CFUNCTYPE(c_size_t, c_void_p, POINTER(c_size_t), POINTER(c_size_t)) +wasmtime_memory_get_callback_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(ctypes.c_size_t)) -wasmtime_memory_grow_callback_t = CFUNCTYPE(c_size_t, c_void_p, c_size_t) +wasmtime_memory_grow_callback_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.c_size_t) -class wasmtime_linear_memory(Structure): +class wasmtime_linear_memory(ctypes.Structure): _fields_ = [ - ("env", c_void_p), + ("env", ctypes.c_void_p), ("get_memory", wasmtime_memory_get_callback_t), ("grow_memory", wasmtime_memory_grow_callback_t), - ("finalizer", CFUNCTYPE(None, c_void_p)), + ("finalizer", ctypes.CFUNCTYPE(None, ctypes.c_void_p)), ] env: ctypes._Pointer get_memory: ctypes._Pointer @@ -2298,13 +2297,13 @@ class wasmtime_linear_memory(Structure): wasmtime_linear_memory_t = wasmtime_linear_memory -wasmtime_new_memory_callback_t = CFUNCTYPE(c_size_t, c_void_p, POINTER(wasm_memorytype_t), c_size_t, c_size_t, c_size_t, c_size_t, POINTER(wasmtime_linear_memory_t)) +wasmtime_new_memory_callback_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.POINTER(wasm_memorytype_t), ctypes.c_size_t, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_size_t, ctypes.POINTER(wasmtime_linear_memory_t)) -class wasmtime_memory_creator(Structure): +class wasmtime_memory_creator(ctypes.Structure): _fields_ = [ - ("env", c_void_p), + ("env", ctypes.c_void_p), ("new_memory", wasmtime_new_memory_callback_t), - ("finalizer", CFUNCTYPE(None, c_void_p)), + ("finalizer", ctypes.CFUNCTYPE(None, ctypes.c_void_p)), ] env: ctypes._Pointer new_memory: ctypes._Pointer @@ -2314,387 +2313,387 @@ class wasmtime_memory_creator(Structure): _wasmtime_config_host_memory_creator_set = dll.wasmtime_config_host_memory_creator_set _wasmtime_config_host_memory_creator_set.restype = None -_wasmtime_config_host_memory_creator_set.argtypes = [POINTER(wasm_config_t), POINTER(wasmtime_memory_creator_t)] +_wasmtime_config_host_memory_creator_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.POINTER(wasmtime_memory_creator_t)] def wasmtime_config_host_memory_creator_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_host_memory_creator_set(arg0, arg1) # type: ignore _wasmtime_config_memory_init_cow_set = dll.wasmtime_config_memory_init_cow_set _wasmtime_config_memory_init_cow_set.restype = None -_wasmtime_config_memory_init_cow_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_memory_init_cow_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_memory_init_cow_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_memory_init_cow_set(arg0, arg1) # type: ignore -class wasmtime_pooling_allocation_config_t(Structure): +class wasmtime_pooling_allocation_config_t(ctypes.Structure): pass _wasmtime_pooling_allocation_config_new = dll.wasmtime_pooling_allocation_config_new -_wasmtime_pooling_allocation_config_new.restype = POINTER(wasmtime_pooling_allocation_config_t) +_wasmtime_pooling_allocation_config_new.restype = ctypes.POINTER(wasmtime_pooling_allocation_config_t) _wasmtime_pooling_allocation_config_new.argtypes = [] def wasmtime_pooling_allocation_config_new() -> ctypes._Pointer: return _wasmtime_pooling_allocation_config_new() # type: ignore _wasmtime_pooling_allocation_config_delete = dll.wasmtime_pooling_allocation_config_delete _wasmtime_pooling_allocation_config_delete.restype = None -_wasmtime_pooling_allocation_config_delete.argtypes = [POINTER(wasmtime_pooling_allocation_config_t)] +_wasmtime_pooling_allocation_config_delete.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t)] def wasmtime_pooling_allocation_config_delete(arg0: Any) -> None: return _wasmtime_pooling_allocation_config_delete(arg0) # type: ignore _wasmtime_pooling_allocation_config_max_unused_warm_slots_set = dll.wasmtime_pooling_allocation_config_max_unused_warm_slots_set _wasmtime_pooling_allocation_config_max_unused_warm_slots_set.restype = None -_wasmtime_pooling_allocation_config_max_unused_warm_slots_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_max_unused_warm_slots_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_max_unused_warm_slots_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_max_unused_warm_slots_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_decommit_batch_size_set = dll.wasmtime_pooling_allocation_config_decommit_batch_size_set _wasmtime_pooling_allocation_config_decommit_batch_size_set.restype = None -_wasmtime_pooling_allocation_config_decommit_batch_size_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_size_t] +_wasmtime_pooling_allocation_config_decommit_batch_size_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_size_t] def wasmtime_pooling_allocation_config_decommit_batch_size_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_decommit_batch_size_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_async_stack_keep_resident_set = dll.wasmtime_pooling_allocation_config_async_stack_keep_resident_set _wasmtime_pooling_allocation_config_async_stack_keep_resident_set.restype = None -_wasmtime_pooling_allocation_config_async_stack_keep_resident_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_size_t] +_wasmtime_pooling_allocation_config_async_stack_keep_resident_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_size_t] def wasmtime_pooling_allocation_config_async_stack_keep_resident_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_async_stack_keep_resident_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_linear_memory_keep_resident_set = dll.wasmtime_pooling_allocation_config_linear_memory_keep_resident_set _wasmtime_pooling_allocation_config_linear_memory_keep_resident_set.restype = None -_wasmtime_pooling_allocation_config_linear_memory_keep_resident_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_size_t] +_wasmtime_pooling_allocation_config_linear_memory_keep_resident_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_size_t] def wasmtime_pooling_allocation_config_linear_memory_keep_resident_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_linear_memory_keep_resident_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_table_keep_resident_set = dll.wasmtime_pooling_allocation_config_table_keep_resident_set _wasmtime_pooling_allocation_config_table_keep_resident_set.restype = None -_wasmtime_pooling_allocation_config_table_keep_resident_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_size_t] +_wasmtime_pooling_allocation_config_table_keep_resident_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_size_t] def wasmtime_pooling_allocation_config_table_keep_resident_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_table_keep_resident_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_total_component_instances_set = dll.wasmtime_pooling_allocation_config_total_component_instances_set _wasmtime_pooling_allocation_config_total_component_instances_set.restype = None -_wasmtime_pooling_allocation_config_total_component_instances_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_total_component_instances_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_total_component_instances_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_total_component_instances_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_max_component_instance_size_set = dll.wasmtime_pooling_allocation_config_max_component_instance_size_set _wasmtime_pooling_allocation_config_max_component_instance_size_set.restype = None -_wasmtime_pooling_allocation_config_max_component_instance_size_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_size_t] +_wasmtime_pooling_allocation_config_max_component_instance_size_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_size_t] def wasmtime_pooling_allocation_config_max_component_instance_size_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_max_component_instance_size_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_max_core_instances_per_component_set = dll.wasmtime_pooling_allocation_config_max_core_instances_per_component_set _wasmtime_pooling_allocation_config_max_core_instances_per_component_set.restype = None -_wasmtime_pooling_allocation_config_max_core_instances_per_component_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_max_core_instances_per_component_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_max_core_instances_per_component_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_max_core_instances_per_component_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_max_memories_per_component_set = dll.wasmtime_pooling_allocation_config_max_memories_per_component_set _wasmtime_pooling_allocation_config_max_memories_per_component_set.restype = None -_wasmtime_pooling_allocation_config_max_memories_per_component_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_max_memories_per_component_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_max_memories_per_component_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_max_memories_per_component_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_max_tables_per_component_set = dll.wasmtime_pooling_allocation_config_max_tables_per_component_set _wasmtime_pooling_allocation_config_max_tables_per_component_set.restype = None -_wasmtime_pooling_allocation_config_max_tables_per_component_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_max_tables_per_component_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_max_tables_per_component_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_max_tables_per_component_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_total_memories_set = dll.wasmtime_pooling_allocation_config_total_memories_set _wasmtime_pooling_allocation_config_total_memories_set.restype = None -_wasmtime_pooling_allocation_config_total_memories_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_total_memories_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_total_memories_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_total_memories_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_total_tables_set = dll.wasmtime_pooling_allocation_config_total_tables_set _wasmtime_pooling_allocation_config_total_tables_set.restype = None -_wasmtime_pooling_allocation_config_total_tables_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_total_tables_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_total_tables_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_total_tables_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_total_stacks_set = dll.wasmtime_pooling_allocation_config_total_stacks_set _wasmtime_pooling_allocation_config_total_stacks_set.restype = None -_wasmtime_pooling_allocation_config_total_stacks_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_total_stacks_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_total_stacks_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_total_stacks_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_total_core_instances_set = dll.wasmtime_pooling_allocation_config_total_core_instances_set _wasmtime_pooling_allocation_config_total_core_instances_set.restype = None -_wasmtime_pooling_allocation_config_total_core_instances_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_total_core_instances_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_total_core_instances_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_total_core_instances_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_max_core_instance_size_set = dll.wasmtime_pooling_allocation_config_max_core_instance_size_set _wasmtime_pooling_allocation_config_max_core_instance_size_set.restype = None -_wasmtime_pooling_allocation_config_max_core_instance_size_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_size_t] +_wasmtime_pooling_allocation_config_max_core_instance_size_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_size_t] def wasmtime_pooling_allocation_config_max_core_instance_size_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_max_core_instance_size_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_max_tables_per_module_set = dll.wasmtime_pooling_allocation_config_max_tables_per_module_set _wasmtime_pooling_allocation_config_max_tables_per_module_set.restype = None -_wasmtime_pooling_allocation_config_max_tables_per_module_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_max_tables_per_module_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_max_tables_per_module_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_max_tables_per_module_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_table_elements_set = dll.wasmtime_pooling_allocation_config_table_elements_set _wasmtime_pooling_allocation_config_table_elements_set.restype = None -_wasmtime_pooling_allocation_config_table_elements_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_size_t] +_wasmtime_pooling_allocation_config_table_elements_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_size_t] def wasmtime_pooling_allocation_config_table_elements_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_table_elements_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_max_memories_per_module_set = dll.wasmtime_pooling_allocation_config_max_memories_per_module_set _wasmtime_pooling_allocation_config_max_memories_per_module_set.restype = None -_wasmtime_pooling_allocation_config_max_memories_per_module_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_max_memories_per_module_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_max_memories_per_module_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_max_memories_per_module_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_max_memory_size_set = dll.wasmtime_pooling_allocation_config_max_memory_size_set _wasmtime_pooling_allocation_config_max_memory_size_set.restype = None -_wasmtime_pooling_allocation_config_max_memory_size_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_size_t] +_wasmtime_pooling_allocation_config_max_memory_size_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_size_t] def wasmtime_pooling_allocation_config_max_memory_size_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_max_memory_size_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_config_total_gc_heaps_set = dll.wasmtime_pooling_allocation_config_total_gc_heaps_set _wasmtime_pooling_allocation_config_total_gc_heaps_set.restype = None -_wasmtime_pooling_allocation_config_total_gc_heaps_set.argtypes = [POINTER(wasmtime_pooling_allocation_config_t), c_uint32] +_wasmtime_pooling_allocation_config_total_gc_heaps_set.argtypes = [ctypes.POINTER(wasmtime_pooling_allocation_config_t), ctypes.c_uint32] def wasmtime_pooling_allocation_config_total_gc_heaps_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_config_total_gc_heaps_set(arg0, arg1) # type: ignore _wasmtime_pooling_allocation_strategy_set = dll.wasmtime_pooling_allocation_strategy_set _wasmtime_pooling_allocation_strategy_set.restype = None -_wasmtime_pooling_allocation_strategy_set.argtypes = [POINTER(wasm_config_t), POINTER(wasmtime_pooling_allocation_config_t)] +_wasmtime_pooling_allocation_strategy_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.POINTER(wasmtime_pooling_allocation_config_t)] def wasmtime_pooling_allocation_strategy_set(arg0: Any, arg1: Any) -> None: return _wasmtime_pooling_allocation_strategy_set(arg0, arg1) # type: ignore _wasmtime_config_wasm_component_model_set = dll.wasmtime_config_wasm_component_model_set _wasmtime_config_wasm_component_model_set.restype = None -_wasmtime_config_wasm_component_model_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_wasm_component_model_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_wasm_component_model_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_wasm_component_model_set(arg0, arg1) # type: ignore _wasmtime_engine_clone = dll.wasmtime_engine_clone -_wasmtime_engine_clone.restype = POINTER(wasm_engine_t) -_wasmtime_engine_clone.argtypes = [POINTER(wasm_engine_t)] +_wasmtime_engine_clone.restype = ctypes.POINTER(wasm_engine_t) +_wasmtime_engine_clone.argtypes = [ctypes.POINTER(wasm_engine_t)] def wasmtime_engine_clone(engine: Any) -> ctypes._Pointer: return _wasmtime_engine_clone(engine) # type: ignore _wasmtime_engine_increment_epoch = dll.wasmtime_engine_increment_epoch _wasmtime_engine_increment_epoch.restype = None -_wasmtime_engine_increment_epoch.argtypes = [POINTER(wasm_engine_t)] +_wasmtime_engine_increment_epoch.argtypes = [ctypes.POINTER(wasm_engine_t)] def wasmtime_engine_increment_epoch(engine: Any) -> None: return _wasmtime_engine_increment_epoch(engine) # type: ignore _wasmtime_engine_is_pulley = dll.wasmtime_engine_is_pulley -_wasmtime_engine_is_pulley.restype = c_bool -_wasmtime_engine_is_pulley.argtypes = [POINTER(wasm_engine_t)] +_wasmtime_engine_is_pulley.restype = ctypes.c_bool +_wasmtime_engine_is_pulley.argtypes = [ctypes.POINTER(wasm_engine_t)] def wasmtime_engine_is_pulley(engine: Any) -> bool: return _wasmtime_engine_is_pulley(engine) # type: ignore -class wasmtime_module(Structure): +class wasmtime_module(ctypes.Structure): pass wasmtime_module_t = wasmtime_module _wasmtime_module_new = dll.wasmtime_module_new -_wasmtime_module_new.restype = POINTER(wasmtime_error_t) -_wasmtime_module_new.argtypes = [POINTER(wasm_engine_t), POINTER(c_uint8), c_size_t, POINTER(POINTER(wasmtime_module_t))] +_wasmtime_module_new.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_module_new.argtypes = [ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_uint8), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasmtime_module_t))] def wasmtime_module_new(engine: Any, wasm: Any, wasm_len: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_module_new(engine, wasm, wasm_len, ret) # type: ignore _wasmtime_module_delete = dll.wasmtime_module_delete _wasmtime_module_delete.restype = None -_wasmtime_module_delete.argtypes = [POINTER(wasmtime_module_t)] +_wasmtime_module_delete.argtypes = [ctypes.POINTER(wasmtime_module_t)] def wasmtime_module_delete(m: Any) -> None: return _wasmtime_module_delete(m) # type: ignore _wasmtime_module_clone = dll.wasmtime_module_clone -_wasmtime_module_clone.restype = POINTER(wasmtime_module_t) -_wasmtime_module_clone.argtypes = [POINTER(wasmtime_module_t)] +_wasmtime_module_clone.restype = ctypes.POINTER(wasmtime_module_t) +_wasmtime_module_clone.argtypes = [ctypes.POINTER(wasmtime_module_t)] def wasmtime_module_clone(m: Any) -> ctypes._Pointer: return _wasmtime_module_clone(m) # type: ignore _wasmtime_module_imports = dll.wasmtime_module_imports _wasmtime_module_imports.restype = None -_wasmtime_module_imports.argtypes = [POINTER(wasmtime_module_t), POINTER(wasm_importtype_vec_t)] +_wasmtime_module_imports.argtypes = [ctypes.POINTER(wasmtime_module_t), ctypes.POINTER(wasm_importtype_vec_t)] def wasmtime_module_imports(module: Any, out: Any) -> None: return _wasmtime_module_imports(module, out) # type: ignore _wasmtime_module_exports = dll.wasmtime_module_exports _wasmtime_module_exports.restype = None -_wasmtime_module_exports.argtypes = [POINTER(wasmtime_module_t), POINTER(wasm_exporttype_vec_t)] +_wasmtime_module_exports.argtypes = [ctypes.POINTER(wasmtime_module_t), ctypes.POINTER(wasm_exporttype_vec_t)] def wasmtime_module_exports(module: Any, out: Any) -> None: return _wasmtime_module_exports(module, out) # type: ignore _wasmtime_module_validate = dll.wasmtime_module_validate -_wasmtime_module_validate.restype = POINTER(wasmtime_error_t) -_wasmtime_module_validate.argtypes = [POINTER(wasm_engine_t), POINTER(c_uint8), c_size_t] +_wasmtime_module_validate.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_module_validate.argtypes = [ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_uint8), ctypes.c_size_t] def wasmtime_module_validate(engine: Any, wasm: Any, wasm_len: Any) -> ctypes._Pointer: return _wasmtime_module_validate(engine, wasm, wasm_len) # type: ignore _wasmtime_module_serialize = dll.wasmtime_module_serialize -_wasmtime_module_serialize.restype = POINTER(wasmtime_error_t) -_wasmtime_module_serialize.argtypes = [POINTER(wasmtime_module_t), POINTER(wasm_byte_vec_t)] +_wasmtime_module_serialize.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_module_serialize.argtypes = [ctypes.POINTER(wasmtime_module_t), ctypes.POINTER(wasm_byte_vec_t)] def wasmtime_module_serialize(module: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_module_serialize(module, ret) # type: ignore _wasmtime_module_deserialize = dll.wasmtime_module_deserialize -_wasmtime_module_deserialize.restype = POINTER(wasmtime_error_t) -_wasmtime_module_deserialize.argtypes = [POINTER(wasm_engine_t), POINTER(c_uint8), c_size_t, POINTER(POINTER(wasmtime_module_t))] +_wasmtime_module_deserialize.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_module_deserialize.argtypes = [ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_uint8), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasmtime_module_t))] def wasmtime_module_deserialize(engine: Any, bytes: Any, bytes_len: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_module_deserialize(engine, bytes, bytes_len, ret) # type: ignore _wasmtime_module_deserialize_file = dll.wasmtime_module_deserialize_file -_wasmtime_module_deserialize_file.restype = POINTER(wasmtime_error_t) -_wasmtime_module_deserialize_file.argtypes = [POINTER(wasm_engine_t), POINTER(c_char), POINTER(POINTER(wasmtime_module_t))] +_wasmtime_module_deserialize_file.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_module_deserialize_file.argtypes = [ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.POINTER(wasmtime_module_t))] def wasmtime_module_deserialize_file(engine: Any, path: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_module_deserialize_file(engine, path, ret) # type: ignore _wasmtime_module_image_range = dll.wasmtime_module_image_range _wasmtime_module_image_range.restype = None -_wasmtime_module_image_range.argtypes = [POINTER(wasmtime_module_t), POINTER(c_void_p), POINTER(c_void_p)] +_wasmtime_module_image_range.argtypes = [ctypes.POINTER(wasmtime_module_t), ctypes.POINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.c_void_p)] def wasmtime_module_image_range(module: Any, start: Any, end: Any) -> None: return _wasmtime_module_image_range(module, start, end) # type: ignore -class wasmtime_sharedmemory(Structure): +class wasmtime_sharedmemory(ctypes.Structure): pass wasmtime_sharedmemory_t = wasmtime_sharedmemory _wasmtime_sharedmemory_new = dll.wasmtime_sharedmemory_new -_wasmtime_sharedmemory_new.restype = POINTER(wasmtime_error_t) -_wasmtime_sharedmemory_new.argtypes = [POINTER(wasm_engine_t), POINTER(wasm_memorytype_t), POINTER(POINTER(wasmtime_sharedmemory_t))] +_wasmtime_sharedmemory_new.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_sharedmemory_new.argtypes = [ctypes.POINTER(wasm_engine_t), ctypes.POINTER(wasm_memorytype_t), ctypes.POINTER(ctypes.POINTER(wasmtime_sharedmemory_t))] def wasmtime_sharedmemory_new(engine: Any, ty: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_sharedmemory_new(engine, ty, ret) # type: ignore _wasmtime_sharedmemory_delete = dll.wasmtime_sharedmemory_delete _wasmtime_sharedmemory_delete.restype = None -_wasmtime_sharedmemory_delete.argtypes = [POINTER(wasmtime_sharedmemory_t)] +_wasmtime_sharedmemory_delete.argtypes = [ctypes.POINTER(wasmtime_sharedmemory_t)] def wasmtime_sharedmemory_delete(memory: Any) -> None: return _wasmtime_sharedmemory_delete(memory) # type: ignore _wasmtime_sharedmemory_clone = dll.wasmtime_sharedmemory_clone -_wasmtime_sharedmemory_clone.restype = POINTER(wasmtime_sharedmemory_t) -_wasmtime_sharedmemory_clone.argtypes = [POINTER(wasmtime_sharedmemory_t)] +_wasmtime_sharedmemory_clone.restype = ctypes.POINTER(wasmtime_sharedmemory_t) +_wasmtime_sharedmemory_clone.argtypes = [ctypes.POINTER(wasmtime_sharedmemory_t)] def wasmtime_sharedmemory_clone(memory: Any) -> ctypes._Pointer: return _wasmtime_sharedmemory_clone(memory) # type: ignore _wasmtime_sharedmemory_type = dll.wasmtime_sharedmemory_type -_wasmtime_sharedmemory_type.restype = POINTER(wasm_memorytype_t) -_wasmtime_sharedmemory_type.argtypes = [POINTER(wasmtime_sharedmemory_t)] +_wasmtime_sharedmemory_type.restype = ctypes.POINTER(wasm_memorytype_t) +_wasmtime_sharedmemory_type.argtypes = [ctypes.POINTER(wasmtime_sharedmemory_t)] def wasmtime_sharedmemory_type(memory: Any) -> ctypes._Pointer: return _wasmtime_sharedmemory_type(memory) # type: ignore _wasmtime_sharedmemory_data = dll.wasmtime_sharedmemory_data -_wasmtime_sharedmemory_data.restype = POINTER(c_uint8) -_wasmtime_sharedmemory_data.argtypes = [POINTER(wasmtime_sharedmemory_t)] +_wasmtime_sharedmemory_data.restype = ctypes.POINTER(ctypes.c_uint8) +_wasmtime_sharedmemory_data.argtypes = [ctypes.POINTER(wasmtime_sharedmemory_t)] def wasmtime_sharedmemory_data(memory: Any) -> ctypes._Pointer: return _wasmtime_sharedmemory_data(memory) # type: ignore _wasmtime_sharedmemory_data_size = dll.wasmtime_sharedmemory_data_size -_wasmtime_sharedmemory_data_size.restype = c_size_t -_wasmtime_sharedmemory_data_size.argtypes = [POINTER(wasmtime_sharedmemory_t)] +_wasmtime_sharedmemory_data_size.restype = ctypes.c_size_t +_wasmtime_sharedmemory_data_size.argtypes = [ctypes.POINTER(wasmtime_sharedmemory_t)] def wasmtime_sharedmemory_data_size(memory: Any) -> int: return _wasmtime_sharedmemory_data_size(memory) # type: ignore _wasmtime_sharedmemory_size = dll.wasmtime_sharedmemory_size -_wasmtime_sharedmemory_size.restype = c_uint64 -_wasmtime_sharedmemory_size.argtypes = [POINTER(wasmtime_sharedmemory_t)] +_wasmtime_sharedmemory_size.restype = ctypes.c_uint64 +_wasmtime_sharedmemory_size.argtypes = [ctypes.POINTER(wasmtime_sharedmemory_t)] def wasmtime_sharedmemory_size(memory: Any) -> int: return _wasmtime_sharedmemory_size(memory) # type: ignore _wasmtime_sharedmemory_grow = dll.wasmtime_sharedmemory_grow -_wasmtime_sharedmemory_grow.restype = POINTER(wasmtime_error_t) -_wasmtime_sharedmemory_grow.argtypes = [POINTER(wasmtime_sharedmemory_t), c_uint64, POINTER(c_uint64)] +_wasmtime_sharedmemory_grow.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_sharedmemory_grow.argtypes = [ctypes.POINTER(wasmtime_sharedmemory_t), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64)] def wasmtime_sharedmemory_grow(memory: Any, delta: Any, prev_size: Any) -> ctypes._Pointer: return _wasmtime_sharedmemory_grow(memory, delta, prev_size) # type: ignore -class wasmtime_store(Structure): +class wasmtime_store(ctypes.Structure): pass wasmtime_store_t = wasmtime_store -class wasmtime_context(Structure): +class wasmtime_context(ctypes.Structure): pass wasmtime_context_t = wasmtime_context _wasmtime_store_new = dll.wasmtime_store_new -_wasmtime_store_new.restype = POINTER(wasmtime_store_t) -_wasmtime_store_new.argtypes = [POINTER(wasm_engine_t), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasmtime_store_new.restype = ctypes.POINTER(wasmtime_store_t) +_wasmtime_store_new.argtypes = [ctypes.POINTER(wasm_engine_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasmtime_store_new(engine: Any, data: Any, finalizer: Any) -> ctypes._Pointer: return _wasmtime_store_new(engine, data, finalizer) # type: ignore _wasmtime_store_context = dll.wasmtime_store_context -_wasmtime_store_context.restype = POINTER(wasmtime_context_t) -_wasmtime_store_context.argtypes = [POINTER(wasmtime_store_t)] +_wasmtime_store_context.restype = ctypes.POINTER(wasmtime_context_t) +_wasmtime_store_context.argtypes = [ctypes.POINTER(wasmtime_store_t)] def wasmtime_store_context(store: Any) -> ctypes._Pointer: return _wasmtime_store_context(store) # type: ignore _wasmtime_store_limiter = dll.wasmtime_store_limiter _wasmtime_store_limiter.restype = None -_wasmtime_store_limiter.argtypes = [POINTER(wasmtime_store_t), c_int64, c_int64, c_int64, c_int64, c_int64] +_wasmtime_store_limiter.argtypes = [ctypes.POINTER(wasmtime_store_t), ctypes.c_int64, ctypes.c_int64, ctypes.c_int64, ctypes.c_int64, ctypes.c_int64] def wasmtime_store_limiter(store: Any, memory_size: Any, table_elements: Any, instances: Any, tables: Any, memories: Any) -> None: return _wasmtime_store_limiter(store, memory_size, table_elements, instances, tables, memories) # type: ignore _wasmtime_store_delete = dll.wasmtime_store_delete _wasmtime_store_delete.restype = None -_wasmtime_store_delete.argtypes = [POINTER(wasmtime_store_t)] +_wasmtime_store_delete.argtypes = [ctypes.POINTER(wasmtime_store_t)] def wasmtime_store_delete(store: Any) -> None: return _wasmtime_store_delete(store) # type: ignore _wasmtime_context_get_data = dll.wasmtime_context_get_data -_wasmtime_context_get_data.restype = c_void_p -_wasmtime_context_get_data.argtypes = [POINTER(wasmtime_context_t)] -def wasmtime_context_get_data(context: Any) -> int: +_wasmtime_context_get_data.restype = ctypes.c_void_p +_wasmtime_context_get_data.argtypes = [ctypes.POINTER(wasmtime_context_t)] +def wasmtime_context_get_data(context: Any) -> ctypes._Pointer: return _wasmtime_context_get_data(context) # type: ignore _wasmtime_context_set_data = dll.wasmtime_context_set_data _wasmtime_context_set_data.restype = None -_wasmtime_context_set_data.argtypes = [POINTER(wasmtime_context_t), c_void_p] +_wasmtime_context_set_data.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_void_p] def wasmtime_context_set_data(context: Any, data: Any) -> None: return _wasmtime_context_set_data(context, data) # type: ignore _wasmtime_context_gc = dll.wasmtime_context_gc _wasmtime_context_gc.restype = None -_wasmtime_context_gc.argtypes = [POINTER(wasmtime_context_t)] +_wasmtime_context_gc.argtypes = [ctypes.POINTER(wasmtime_context_t)] def wasmtime_context_gc(context: Any) -> None: return _wasmtime_context_gc(context) # type: ignore _wasmtime_context_set_fuel = dll.wasmtime_context_set_fuel -_wasmtime_context_set_fuel.restype = POINTER(wasmtime_error_t) -_wasmtime_context_set_fuel.argtypes = [POINTER(wasmtime_context_t), c_uint64] +_wasmtime_context_set_fuel.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_context_set_fuel.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_uint64] def wasmtime_context_set_fuel(store: Any, fuel: Any) -> ctypes._Pointer: return _wasmtime_context_set_fuel(store, fuel) # type: ignore _wasmtime_context_get_fuel = dll.wasmtime_context_get_fuel -_wasmtime_context_get_fuel.restype = POINTER(wasmtime_error_t) -_wasmtime_context_get_fuel.argtypes = [POINTER(wasmtime_context_t), POINTER(c_uint64)] +_wasmtime_context_get_fuel.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_context_get_fuel.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(ctypes.c_uint64)] def wasmtime_context_get_fuel(context: Any, fuel: Any) -> ctypes._Pointer: return _wasmtime_context_get_fuel(context, fuel) # type: ignore _wasmtime_context_set_wasi = dll.wasmtime_context_set_wasi -_wasmtime_context_set_wasi.restype = POINTER(wasmtime_error_t) -_wasmtime_context_set_wasi.argtypes = [POINTER(wasmtime_context_t), POINTER(wasi_config_t)] +_wasmtime_context_set_wasi.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_context_set_wasi.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasi_config_t)] def wasmtime_context_set_wasi(context: Any, wasi: Any) -> ctypes._Pointer: return _wasmtime_context_set_wasi(context, wasi) # type: ignore _wasmtime_context_set_epoch_deadline = dll.wasmtime_context_set_epoch_deadline _wasmtime_context_set_epoch_deadline.restype = None -_wasmtime_context_set_epoch_deadline.argtypes = [POINTER(wasmtime_context_t), c_uint64] +_wasmtime_context_set_epoch_deadline.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_uint64] def wasmtime_context_set_epoch_deadline(context: Any, ticks_beyond_current: Any) -> None: return _wasmtime_context_set_epoch_deadline(context, ticks_beyond_current) # type: ignore -wasmtime_update_deadline_kind_t = c_uint8 +wasmtime_update_deadline_kind_t = ctypes.c_uint8 _wasmtime_store_epoch_deadline_callback = dll.wasmtime_store_epoch_deadline_callback _wasmtime_store_epoch_deadline_callback.restype = None -_wasmtime_store_epoch_deadline_callback.argtypes = [POINTER(wasmtime_store_t), CFUNCTYPE(c_size_t, POINTER(wasmtime_context_t), c_void_p, POINTER(c_uint64), POINTER(wasmtime_update_deadline_kind_t)), c_void_p, CFUNCTYPE(None, c_void_p)] +_wasmtime_store_epoch_deadline_callback.argtypes = [ctypes.POINTER(wasmtime_store_t), ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.POINTER(wasmtime_context_t), ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(wasmtime_update_deadline_kind_t)), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasmtime_store_epoch_deadline_callback(store: Any, func: Any, data: Any, finalizer: Any) -> None: return _wasmtime_store_epoch_deadline_callback(store, func, data, finalizer) # type: ignore -class wasmtime_func(Structure): +class wasmtime_func(ctypes.Structure): _fields_ = [ - ("store_id", c_uint64), - ("__private", c_void_p), + ("store_id", ctypes.c_uint64), + ("__private", ctypes.c_void_p), ] store_id: int __private: ctypes._Pointer @@ -2702,17 +2701,17 @@ class wasmtime_func(Structure): wasmtime_func_t = wasmtime_func -class wasmtime_table_anon_0(Structure): +class wasmtime_table_anon_0(ctypes.Structure): _fields_ = [ - ("store_id", c_uint64), - ("__private1", c_uint32), + ("store_id", ctypes.c_uint64), + ("__private1", ctypes.c_uint32), ] store_id: int __private1: int -class wasmtime_table(Structure): +class wasmtime_table(ctypes.Structure): _fields_ = [ ("_anon_1", wasmtime_table_anon_0), - ("__private2", c_uint32), + ("__private2", ctypes.c_uint32), ] _anon_1: wasmtime_table_anon_0 __private2: int @@ -2720,29 +2719,29 @@ class wasmtime_table(Structure): wasmtime_table_t = wasmtime_table -class wasmtime_memory_anon_0(Structure): +class wasmtime_memory_anon_0(ctypes.Structure): _fields_ = [ - ("store_id", c_uint64), - ("__private1", c_uint32), + ("store_id", ctypes.c_uint64), + ("__private1", ctypes.c_uint32), ] store_id: int __private1: int -class wasmtime_memory(Structure): +class wasmtime_memory(ctypes.Structure): _fields_ = [ ("_anon_1", wasmtime_memory_anon_0), - ("__private2", c_uint32), + ("__private2", ctypes.c_uint32), ] _anon_1: wasmtime_memory_anon_0 __private2: int wasmtime_memory_t = wasmtime_memory -class wasmtime_global(Structure): +class wasmtime_global(ctypes.Structure): _fields_ = [ - ("store_id", c_uint64), - ("__private1", c_uint32), - ("__private2", c_uint32), - ("__private3", c_uint32), + ("store_id", ctypes.c_uint64), + ("__private1", ctypes.c_uint32), + ("__private2", ctypes.c_uint32), + ("__private3", ctypes.c_uint32), ] store_id: int __private1: int @@ -2751,15 +2750,15 @@ class wasmtime_global(Structure): wasmtime_global_t = wasmtime_global -wasmtime_extern_kind_t = c_uint8 +wasmtime_extern_kind_t = ctypes.c_uint8 -class wasmtime_extern_union(Union): +class wasmtime_extern_union(ctypes.Union): _fields_ = [ ("func", wasmtime_func_t), ("global_", wasmtime_global_t), ("table", wasmtime_table_t), ("memory", wasmtime_memory_t), - ("sharedmemory", POINTER(wasmtime_sharedmemory)), + ("sharedmemory", ctypes.POINTER(wasmtime_sharedmemory)), ] func: wasmtime_func_t global_: wasmtime_global_t @@ -2769,7 +2768,7 @@ class wasmtime_extern_union(Union): wasmtime_extern_union_t = wasmtime_extern_union -class wasmtime_extern(Structure): +class wasmtime_extern(ctypes.Structure): _fields_ = [ ("kind", wasmtime_extern_kind_t), ("of", wasmtime_extern_union_t), @@ -2781,22 +2780,22 @@ class wasmtime_extern(Structure): _wasmtime_extern_delete = dll.wasmtime_extern_delete _wasmtime_extern_delete.restype = None -_wasmtime_extern_delete.argtypes = [POINTER(wasmtime_extern_t)] +_wasmtime_extern_delete.argtypes = [ctypes.POINTER(wasmtime_extern_t)] def wasmtime_extern_delete(val: Any) -> None: return _wasmtime_extern_delete(val) # type: ignore _wasmtime_extern_type = dll.wasmtime_extern_type -_wasmtime_extern_type.restype = POINTER(wasm_externtype_t) -_wasmtime_extern_type.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_extern_t)] +_wasmtime_extern_type.restype = ctypes.POINTER(wasm_externtype_t) +_wasmtime_extern_type.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_extern_t)] def wasmtime_extern_type(context: Any, val: Any) -> ctypes._Pointer: return _wasmtime_extern_type(context, val) # type: ignore -class wasmtime_anyref(Structure): +class wasmtime_anyref(ctypes.Structure): _fields_ = [ - ("store_id", c_uint64), - ("__private1", c_uint32), - ("__private2", c_uint32), - ("__private3", c_void_p), + ("store_id", ctypes.c_uint64), + ("__private1", ctypes.c_uint32), + ("__private2", ctypes.c_uint32), + ("__private3", ctypes.c_void_p), ] store_id: int __private1: int @@ -2807,52 +2806,52 @@ class wasmtime_anyref(Structure): _wasmtime_anyref_clone = dll.wasmtime_anyref_clone _wasmtime_anyref_clone.restype = None -_wasmtime_anyref_clone.argtypes = [POINTER(wasmtime_anyref_t), POINTER(wasmtime_anyref_t)] +_wasmtime_anyref_clone.argtypes = [ctypes.POINTER(wasmtime_anyref_t), ctypes.POINTER(wasmtime_anyref_t)] def wasmtime_anyref_clone(anyref: Any, out: Any) -> None: return _wasmtime_anyref_clone(anyref, out) # type: ignore _wasmtime_anyref_unroot = dll.wasmtime_anyref_unroot _wasmtime_anyref_unroot.restype = None -_wasmtime_anyref_unroot.argtypes = [POINTER(wasmtime_anyref_t)] +_wasmtime_anyref_unroot.argtypes = [ctypes.POINTER(wasmtime_anyref_t)] def wasmtime_anyref_unroot(ref: Any) -> None: return _wasmtime_anyref_unroot(ref) # type: ignore _wasmtime_anyref_from_raw = dll.wasmtime_anyref_from_raw _wasmtime_anyref_from_raw.restype = None -_wasmtime_anyref_from_raw.argtypes = [POINTER(wasmtime_context_t), c_uint32, POINTER(wasmtime_anyref_t)] +_wasmtime_anyref_from_raw.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_uint32, ctypes.POINTER(wasmtime_anyref_t)] def wasmtime_anyref_from_raw(context: Any, raw: Any, out: Any) -> None: return _wasmtime_anyref_from_raw(context, raw, out) # type: ignore _wasmtime_anyref_to_raw = dll.wasmtime_anyref_to_raw -_wasmtime_anyref_to_raw.restype = c_uint32 -_wasmtime_anyref_to_raw.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_anyref_t)] +_wasmtime_anyref_to_raw.restype = ctypes.c_uint32 +_wasmtime_anyref_to_raw.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_anyref_t)] def wasmtime_anyref_to_raw(context: Any, ref: Any) -> int: return _wasmtime_anyref_to_raw(context, ref) # type: ignore _wasmtime_anyref_from_i31 = dll.wasmtime_anyref_from_i31 _wasmtime_anyref_from_i31.restype = None -_wasmtime_anyref_from_i31.argtypes = [POINTER(wasmtime_context_t), c_uint32, POINTER(wasmtime_anyref_t)] +_wasmtime_anyref_from_i31.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_uint32, ctypes.POINTER(wasmtime_anyref_t)] def wasmtime_anyref_from_i31(context: Any, i31val: Any, out: Any) -> None: return _wasmtime_anyref_from_i31(context, i31val, out) # type: ignore _wasmtime_anyref_i31_get_u = dll.wasmtime_anyref_i31_get_u -_wasmtime_anyref_i31_get_u.restype = c_bool -_wasmtime_anyref_i31_get_u.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_anyref_t), POINTER(c_uint32)] +_wasmtime_anyref_i31_get_u.restype = ctypes.c_bool +_wasmtime_anyref_i31_get_u.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_anyref_t), ctypes.POINTER(ctypes.c_uint32)] def wasmtime_anyref_i31_get_u(context: Any, anyref: Any, dst: Any) -> bool: return _wasmtime_anyref_i31_get_u(context, anyref, dst) # type: ignore _wasmtime_anyref_i31_get_s = dll.wasmtime_anyref_i31_get_s -_wasmtime_anyref_i31_get_s.restype = c_bool -_wasmtime_anyref_i31_get_s.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_anyref_t), POINTER(c_int32)] +_wasmtime_anyref_i31_get_s.restype = ctypes.c_bool +_wasmtime_anyref_i31_get_s.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_anyref_t), ctypes.POINTER(ctypes.c_int32)] def wasmtime_anyref_i31_get_s(context: Any, anyref: Any, dst: Any) -> bool: return _wasmtime_anyref_i31_get_s(context, anyref, dst) # type: ignore -class wasmtime_externref(Structure): +class wasmtime_externref(ctypes.Structure): _fields_ = [ - ("store_id", c_uint64), - ("__private1", c_uint32), - ("__private2", c_uint32), - ("__private3", c_void_p), + ("store_id", ctypes.c_uint64), + ("__private1", ctypes.c_uint32), + ("__private2", ctypes.c_uint32), + ("__private3", ctypes.c_void_p), ] store_id: int __private1: int @@ -2862,51 +2861,51 @@ class wasmtime_externref(Structure): wasmtime_externref_t = wasmtime_externref _wasmtime_externref_new = dll.wasmtime_externref_new -_wasmtime_externref_new.restype = c_bool -_wasmtime_externref_new.argtypes = [POINTER(wasmtime_context_t), c_void_p, CFUNCTYPE(None, c_void_p), POINTER(wasmtime_externref_t)] +_wasmtime_externref_new.restype = ctypes.c_bool +_wasmtime_externref_new.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p), ctypes.POINTER(wasmtime_externref_t)] def wasmtime_externref_new(context: Any, data: Any, finalizer: Any, out: Any) -> bool: return _wasmtime_externref_new(context, data, finalizer, out) # type: ignore _wasmtime_externref_data = dll.wasmtime_externref_data -_wasmtime_externref_data.restype = c_void_p -_wasmtime_externref_data.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_externref_t)] -def wasmtime_externref_data(context: Any, data: Any) -> int: +_wasmtime_externref_data.restype = ctypes.c_void_p +_wasmtime_externref_data.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_externref_t)] +def wasmtime_externref_data(context: Any, data: Any) -> ctypes._Pointer: return _wasmtime_externref_data(context, data) # type: ignore _wasmtime_externref_clone = dll.wasmtime_externref_clone _wasmtime_externref_clone.restype = None -_wasmtime_externref_clone.argtypes = [POINTER(wasmtime_externref_t), POINTER(wasmtime_externref_t)] +_wasmtime_externref_clone.argtypes = [ctypes.POINTER(wasmtime_externref_t), ctypes.POINTER(wasmtime_externref_t)] def wasmtime_externref_clone(ref: Any, out: Any) -> None: return _wasmtime_externref_clone(ref, out) # type: ignore _wasmtime_externref_unroot = dll.wasmtime_externref_unroot _wasmtime_externref_unroot.restype = None -_wasmtime_externref_unroot.argtypes = [POINTER(wasmtime_externref_t)] +_wasmtime_externref_unroot.argtypes = [ctypes.POINTER(wasmtime_externref_t)] def wasmtime_externref_unroot(ref: Any) -> None: return _wasmtime_externref_unroot(ref) # type: ignore _wasmtime_externref_from_raw = dll.wasmtime_externref_from_raw _wasmtime_externref_from_raw.restype = None -_wasmtime_externref_from_raw.argtypes = [POINTER(wasmtime_context_t), c_uint32, POINTER(wasmtime_externref_t)] +_wasmtime_externref_from_raw.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_uint32, ctypes.POINTER(wasmtime_externref_t)] def wasmtime_externref_from_raw(context: Any, raw: Any, out: Any) -> None: return _wasmtime_externref_from_raw(context, raw, out) # type: ignore _wasmtime_externref_to_raw = dll.wasmtime_externref_to_raw -_wasmtime_externref_to_raw.restype = c_uint32 -_wasmtime_externref_to_raw.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_externref_t)] +_wasmtime_externref_to_raw.restype = ctypes.c_uint32 +_wasmtime_externref_to_raw.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_externref_t)] def wasmtime_externref_to_raw(context: Any, ref: Any) -> int: return _wasmtime_externref_to_raw(context, ref) # type: ignore -wasmtime_valkind_t = c_uint8 +wasmtime_valkind_t = ctypes.c_uint8 -wasmtime_v128 = c_uint8 * 16 +wasmtime_v128 = ctypes.c_uint8 * 16 -class wasmtime_valunion(Union): +class wasmtime_valunion(ctypes.Union): _fields_ = [ - ("i32", c_int32), - ("i64", c_int64), - ("f32", c_float), - ("f64", c_double), + ("i32", ctypes.c_int32), + ("i64", ctypes.c_int64), + ("f32", ctypes.c_float), + ("f64", ctypes.c_double), ("anyref", wasmtime_anyref_t), ("externref", wasmtime_externref_t), ("funcref", wasmtime_func_t), @@ -2923,16 +2922,16 @@ class wasmtime_valunion(Union): wasmtime_valunion_t = wasmtime_valunion -class wasmtime_val_raw(Union): +class wasmtime_val_raw(ctypes.Union): _fields_ = [ - ("i32", c_int32), - ("i64", c_int64), - ("f32", c_float), - ("f64", c_double), + ("i32", ctypes.c_int32), + ("i64", ctypes.c_int64), + ("f32", ctypes.c_float), + ("f64", ctypes.c_double), ("v128", wasmtime_v128), - ("anyref", c_uint32), - ("externref", c_uint32), - ("funcref", c_void_p), + ("anyref", ctypes.c_uint32), + ("externref", ctypes.c_uint32), + ("funcref", ctypes.c_void_p), ] i32: int i64: int @@ -2945,7 +2944,7 @@ class wasmtime_val_raw(Union): wasmtime_val_raw_t = wasmtime_val_raw -class wasmtime_val(Structure): +class wasmtime_val(ctypes.Structure): _fields_ = [ ("kind", wasmtime_valkind_t), ("of", wasmtime_valunion_t), @@ -2957,107 +2956,107 @@ class wasmtime_val(Structure): _wasmtime_val_unroot = dll.wasmtime_val_unroot _wasmtime_val_unroot.restype = None -_wasmtime_val_unroot.argtypes = [POINTER(wasmtime_val_t)] +_wasmtime_val_unroot.argtypes = [ctypes.POINTER(wasmtime_val_t)] def wasmtime_val_unroot(val: Any) -> None: return _wasmtime_val_unroot(val) # type: ignore _wasmtime_val_clone = dll.wasmtime_val_clone _wasmtime_val_clone.restype = None -_wasmtime_val_clone.argtypes = [POINTER(wasmtime_val_t), POINTER(wasmtime_val_t)] +_wasmtime_val_clone.argtypes = [ctypes.POINTER(wasmtime_val_t), ctypes.POINTER(wasmtime_val_t)] def wasmtime_val_clone(src: Any, dst: Any) -> None: return _wasmtime_val_clone(src, dst) # type: ignore -class wasmtime_caller(Structure): +class wasmtime_caller(ctypes.Structure): pass wasmtime_caller_t = wasmtime_caller -wasmtime_func_callback_t = CFUNCTYPE(c_size_t, c_void_p, POINTER(wasmtime_caller_t), POINTER(wasmtime_val_t), c_size_t, POINTER(wasmtime_val_t), c_size_t) +wasmtime_func_callback_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.POINTER(wasmtime_caller_t), ctypes.POINTER(wasmtime_val_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_val_t), ctypes.c_size_t) _wasmtime_func_new = dll.wasmtime_func_new _wasmtime_func_new.restype = None -_wasmtime_func_new.argtypes = [POINTER(wasmtime_context_t), POINTER(wasm_functype_t), wasmtime_func_callback_t, c_void_p, CFUNCTYPE(None, c_void_p), POINTER(wasmtime_func_t)] +_wasmtime_func_new.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasm_functype_t), wasmtime_func_callback_t, ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p), ctypes.POINTER(wasmtime_func_t)] def wasmtime_func_new(store: Any, type: Any, callback: Any, env: Any, finalizer: Any, ret: Any) -> None: return _wasmtime_func_new(store, type, callback, env, finalizer, ret) # type: ignore -wasmtime_func_unchecked_callback_t = CFUNCTYPE(c_size_t, c_void_p, POINTER(wasmtime_caller_t), POINTER(wasmtime_val_raw_t), c_size_t) +wasmtime_func_unchecked_callback_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.POINTER(wasmtime_caller_t), ctypes.POINTER(wasmtime_val_raw_t), ctypes.c_size_t) _wasmtime_func_new_unchecked = dll.wasmtime_func_new_unchecked _wasmtime_func_new_unchecked.restype = None -_wasmtime_func_new_unchecked.argtypes = [POINTER(wasmtime_context_t), POINTER(wasm_functype_t), wasmtime_func_unchecked_callback_t, c_void_p, CFUNCTYPE(None, c_void_p), POINTER(wasmtime_func_t)] +_wasmtime_func_new_unchecked.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasm_functype_t), wasmtime_func_unchecked_callback_t, ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p), ctypes.POINTER(wasmtime_func_t)] def wasmtime_func_new_unchecked(store: Any, type: Any, callback: Any, env: Any, finalizer: Any, ret: Any) -> None: return _wasmtime_func_new_unchecked(store, type, callback, env, finalizer, ret) # type: ignore _wasmtime_func_type = dll.wasmtime_func_type -_wasmtime_func_type.restype = POINTER(wasm_functype_t) -_wasmtime_func_type.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_func_t)] +_wasmtime_func_type.restype = ctypes.POINTER(wasm_functype_t) +_wasmtime_func_type.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_func_t)] def wasmtime_func_type(store: Any, func: Any) -> ctypes._Pointer: return _wasmtime_func_type(store, func) # type: ignore _wasmtime_func_call = dll.wasmtime_func_call -_wasmtime_func_call.restype = POINTER(wasmtime_error_t) -_wasmtime_func_call.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_func_t), POINTER(wasmtime_val_t), c_size_t, POINTER(wasmtime_val_t), c_size_t, POINTER(POINTER(wasm_trap_t))] +_wasmtime_func_call.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_func_call.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_func_t), ctypes.POINTER(wasmtime_val_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_val_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_trap_t))] def wasmtime_func_call(store: Any, func: Any, args: Any, nargs: Any, results: Any, nresults: Any, trap: Any) -> ctypes._Pointer: return _wasmtime_func_call(store, func, args, nargs, results, nresults, trap) # type: ignore _wasmtime_func_call_unchecked = dll.wasmtime_func_call_unchecked -_wasmtime_func_call_unchecked.restype = POINTER(wasmtime_error_t) -_wasmtime_func_call_unchecked.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_func_t), POINTER(wasmtime_val_raw_t), c_size_t, POINTER(POINTER(wasm_trap_t))] +_wasmtime_func_call_unchecked.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_func_call_unchecked.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_func_t), ctypes.POINTER(wasmtime_val_raw_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_trap_t))] def wasmtime_func_call_unchecked(store: Any, func: Any, args_and_results: Any, args_and_results_len: Any, trap: Any) -> ctypes._Pointer: return _wasmtime_func_call_unchecked(store, func, args_and_results, args_and_results_len, trap) # type: ignore _wasmtime_caller_export_get = dll.wasmtime_caller_export_get -_wasmtime_caller_export_get.restype = c_bool -_wasmtime_caller_export_get.argtypes = [POINTER(wasmtime_caller_t), POINTER(c_char), c_size_t, POINTER(wasmtime_extern_t)] +_wasmtime_caller_export_get.restype = ctypes.c_bool +_wasmtime_caller_export_get.argtypes = [ctypes.POINTER(wasmtime_caller_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_extern_t)] def wasmtime_caller_export_get(caller: Any, name: Any, name_len: Any, item: Any) -> bool: return _wasmtime_caller_export_get(caller, name, name_len, item) # type: ignore _wasmtime_caller_context = dll.wasmtime_caller_context -_wasmtime_caller_context.restype = POINTER(wasmtime_context_t) -_wasmtime_caller_context.argtypes = [POINTER(wasmtime_caller_t)] +_wasmtime_caller_context.restype = ctypes.POINTER(wasmtime_context_t) +_wasmtime_caller_context.argtypes = [ctypes.POINTER(wasmtime_caller_t)] def wasmtime_caller_context(caller: Any) -> ctypes._Pointer: return _wasmtime_caller_context(caller) # type: ignore _wasmtime_func_from_raw = dll.wasmtime_func_from_raw _wasmtime_func_from_raw.restype = None -_wasmtime_func_from_raw.argtypes = [POINTER(wasmtime_context_t), c_void_p, POINTER(wasmtime_func_t)] +_wasmtime_func_from_raw.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_void_p, ctypes.POINTER(wasmtime_func_t)] def wasmtime_func_from_raw(context: Any, raw: Any, ret: Any) -> None: return _wasmtime_func_from_raw(context, raw, ret) # type: ignore _wasmtime_func_to_raw = dll.wasmtime_func_to_raw -_wasmtime_func_to_raw.restype = c_void_p -_wasmtime_func_to_raw.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_func_t)] -def wasmtime_func_to_raw(context: Any, func: Any) -> int: +_wasmtime_func_to_raw.restype = ctypes.c_void_p +_wasmtime_func_to_raw.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_func_t)] +def wasmtime_func_to_raw(context: Any, func: Any) -> ctypes._Pointer: return _wasmtime_func_to_raw(context, func) # type: ignore _wasmtime_global_new = dll.wasmtime_global_new -_wasmtime_global_new.restype = POINTER(wasmtime_error_t) -_wasmtime_global_new.argtypes = [POINTER(wasmtime_context_t), POINTER(wasm_globaltype_t), POINTER(wasmtime_val_t), POINTER(wasmtime_global_t)] +_wasmtime_global_new.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_global_new.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasm_globaltype_t), ctypes.POINTER(wasmtime_val_t), ctypes.POINTER(wasmtime_global_t)] def wasmtime_global_new(store: Any, type: Any, val: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_global_new(store, type, val, ret) # type: ignore _wasmtime_global_type = dll.wasmtime_global_type -_wasmtime_global_type.restype = POINTER(wasm_globaltype_t) -_wasmtime_global_type.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_global_t)] +_wasmtime_global_type.restype = ctypes.POINTER(wasm_globaltype_t) +_wasmtime_global_type.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_global_t)] def wasmtime_global_type(store: Any, arg1: Any) -> ctypes._Pointer: return _wasmtime_global_type(store, arg1) # type: ignore _wasmtime_global_get = dll.wasmtime_global_get _wasmtime_global_get.restype = None -_wasmtime_global_get.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_global_t), POINTER(wasmtime_val_t)] +_wasmtime_global_get.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_global_t), ctypes.POINTER(wasmtime_val_t)] def wasmtime_global_get(store: Any, arg1: Any, out: Any) -> None: return _wasmtime_global_get(store, arg1, out) # type: ignore _wasmtime_global_set = dll.wasmtime_global_set -_wasmtime_global_set.restype = POINTER(wasmtime_error_t) -_wasmtime_global_set.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_global_t), POINTER(wasmtime_val_t)] +_wasmtime_global_set.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_global_set.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_global_t), ctypes.POINTER(wasmtime_val_t)] def wasmtime_global_set(store: Any, arg1: Any, val: Any) -> ctypes._Pointer: return _wasmtime_global_set(store, arg1, val) # type: ignore -class wasmtime_instance(Structure): +class wasmtime_instance(ctypes.Structure): _fields_ = [ - ("store_id", c_uint64), - ("__private", c_size_t), + ("store_id", ctypes.c_uint64), + ("__private", ctypes.c_size_t), ] store_id: int __private: int @@ -3065,252 +3064,252 @@ class wasmtime_instance(Structure): wasmtime_instance_t = wasmtime_instance _wasmtime_instance_new = dll.wasmtime_instance_new -_wasmtime_instance_new.restype = POINTER(wasmtime_error_t) -_wasmtime_instance_new.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_module_t), POINTER(wasmtime_extern_t), c_size_t, POINTER(wasmtime_instance_t), POINTER(POINTER(wasm_trap_t))] +_wasmtime_instance_new.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_instance_new.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_module_t), ctypes.POINTER(wasmtime_extern_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_instance_t), ctypes.POINTER(ctypes.POINTER(wasm_trap_t))] def wasmtime_instance_new(store: Any, module: Any, imports: Any, nimports: Any, instance: Any, trap: Any) -> ctypes._Pointer: return _wasmtime_instance_new(store, module, imports, nimports, instance, trap) # type: ignore _wasmtime_instance_export_get = dll.wasmtime_instance_export_get -_wasmtime_instance_export_get.restype = c_bool -_wasmtime_instance_export_get.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_instance_t), POINTER(c_char), c_size_t, POINTER(wasmtime_extern_t)] +_wasmtime_instance_export_get.restype = ctypes.c_bool +_wasmtime_instance_export_get.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_instance_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_extern_t)] def wasmtime_instance_export_get(store: Any, instance: Any, name: Any, name_len: Any, item: Any) -> bool: return _wasmtime_instance_export_get(store, instance, name, name_len, item) # type: ignore _wasmtime_instance_export_nth = dll.wasmtime_instance_export_nth -_wasmtime_instance_export_nth.restype = c_bool -_wasmtime_instance_export_nth.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_instance_t), c_size_t, POINTER(POINTER(c_char)), POINTER(c_size_t), POINTER(wasmtime_extern_t)] +_wasmtime_instance_export_nth.restype = ctypes.c_bool +_wasmtime_instance_export_nth.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_instance_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(wasmtime_extern_t)] def wasmtime_instance_export_nth(store: Any, instance: Any, index: Any, name: Any, name_len: Any, item: Any) -> bool: return _wasmtime_instance_export_nth(store, instance, index, name, name_len, item) # type: ignore -class wasmtime_instance_pre(Structure): +class wasmtime_instance_pre(ctypes.Structure): pass wasmtime_instance_pre_t = wasmtime_instance_pre _wasmtime_instance_pre_delete = dll.wasmtime_instance_pre_delete _wasmtime_instance_pre_delete.restype = None -_wasmtime_instance_pre_delete.argtypes = [POINTER(wasmtime_instance_pre_t)] +_wasmtime_instance_pre_delete.argtypes = [ctypes.POINTER(wasmtime_instance_pre_t)] def wasmtime_instance_pre_delete(instance_pre: Any) -> None: return _wasmtime_instance_pre_delete(instance_pre) # type: ignore _wasmtime_instance_pre_instantiate = dll.wasmtime_instance_pre_instantiate -_wasmtime_instance_pre_instantiate.restype = POINTER(wasmtime_error_t) -_wasmtime_instance_pre_instantiate.argtypes = [POINTER(wasmtime_instance_pre_t), POINTER(wasmtime_context_t), POINTER(wasmtime_instance_t), POINTER(POINTER(wasm_trap_t))] +_wasmtime_instance_pre_instantiate.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_instance_pre_instantiate.argtypes = [ctypes.POINTER(wasmtime_instance_pre_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_instance_t), ctypes.POINTER(ctypes.POINTER(wasm_trap_t))] def wasmtime_instance_pre_instantiate(instance_pre: Any, store: Any, instance: Any, trap_ptr: Any) -> ctypes._Pointer: return _wasmtime_instance_pre_instantiate(instance_pre, store, instance, trap_ptr) # type: ignore _wasmtime_instance_pre_module = dll.wasmtime_instance_pre_module -_wasmtime_instance_pre_module.restype = POINTER(wasmtime_module_t) -_wasmtime_instance_pre_module.argtypes = [POINTER(wasmtime_instance_pre_t)] +_wasmtime_instance_pre_module.restype = ctypes.POINTER(wasmtime_module_t) +_wasmtime_instance_pre_module.argtypes = [ctypes.POINTER(wasmtime_instance_pre_t)] def wasmtime_instance_pre_module(instance_pre: Any) -> ctypes._Pointer: return _wasmtime_instance_pre_module(instance_pre) # type: ignore -class wasmtime_linker(Structure): +class wasmtime_linker(ctypes.Structure): pass wasmtime_linker_t = wasmtime_linker _wasmtime_linker_new = dll.wasmtime_linker_new -_wasmtime_linker_new.restype = POINTER(wasmtime_linker_t) -_wasmtime_linker_new.argtypes = [POINTER(wasm_engine_t)] +_wasmtime_linker_new.restype = ctypes.POINTER(wasmtime_linker_t) +_wasmtime_linker_new.argtypes = [ctypes.POINTER(wasm_engine_t)] def wasmtime_linker_new(engine: Any) -> ctypes._Pointer: return _wasmtime_linker_new(engine) # type: ignore _wasmtime_linker_clone = dll.wasmtime_linker_clone -_wasmtime_linker_clone.restype = POINTER(wasmtime_linker_t) -_wasmtime_linker_clone.argtypes = [POINTER(wasmtime_linker_t)] +_wasmtime_linker_clone.restype = ctypes.POINTER(wasmtime_linker_t) +_wasmtime_linker_clone.argtypes = [ctypes.POINTER(wasmtime_linker_t)] def wasmtime_linker_clone(linker: Any) -> ctypes._Pointer: return _wasmtime_linker_clone(linker) # type: ignore _wasmtime_linker_delete = dll.wasmtime_linker_delete _wasmtime_linker_delete.restype = None -_wasmtime_linker_delete.argtypes = [POINTER(wasmtime_linker_t)] +_wasmtime_linker_delete.argtypes = [ctypes.POINTER(wasmtime_linker_t)] def wasmtime_linker_delete(linker: Any) -> None: return _wasmtime_linker_delete(linker) # type: ignore _wasmtime_linker_allow_shadowing = dll.wasmtime_linker_allow_shadowing _wasmtime_linker_allow_shadowing.restype = None -_wasmtime_linker_allow_shadowing.argtypes = [POINTER(wasmtime_linker_t), c_bool] +_wasmtime_linker_allow_shadowing.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.c_bool] def wasmtime_linker_allow_shadowing(linker: Any, allow_shadowing: Any) -> None: return _wasmtime_linker_allow_shadowing(linker, allow_shadowing) # type: ignore _wasmtime_linker_define_unknown_imports_as_traps = dll.wasmtime_linker_define_unknown_imports_as_traps -_wasmtime_linker_define_unknown_imports_as_traps.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_define_unknown_imports_as_traps.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_module_t)] +_wasmtime_linker_define_unknown_imports_as_traps.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_define_unknown_imports_as_traps.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_module_t)] def wasmtime_linker_define_unknown_imports_as_traps(linker: Any, module: Any) -> ctypes._Pointer: return _wasmtime_linker_define_unknown_imports_as_traps(linker, module) # type: ignore _wasmtime_linker_define_unknown_imports_as_default_values = dll.wasmtime_linker_define_unknown_imports_as_default_values -_wasmtime_linker_define_unknown_imports_as_default_values.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_define_unknown_imports_as_default_values.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_context_t), POINTER(wasmtime_module_t)] +_wasmtime_linker_define_unknown_imports_as_default_values.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_define_unknown_imports_as_default_values.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_module_t)] def wasmtime_linker_define_unknown_imports_as_default_values(linker: Any, store: Any, module: Any) -> ctypes._Pointer: return _wasmtime_linker_define_unknown_imports_as_default_values(linker, store, module) # type: ignore _wasmtime_linker_define = dll.wasmtime_linker_define -_wasmtime_linker_define.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_define.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_context_t), POINTER(c_char), c_size_t, POINTER(c_char), c_size_t, POINTER(wasmtime_extern_t)] +_wasmtime_linker_define.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_define.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_extern_t)] def wasmtime_linker_define(linker: Any, store: Any, module: Any, module_len: Any, name: Any, name_len: Any, item: Any) -> ctypes._Pointer: return _wasmtime_linker_define(linker, store, module, module_len, name, name_len, item) # type: ignore _wasmtime_linker_define_func = dll.wasmtime_linker_define_func -_wasmtime_linker_define_func.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_define_func.argtypes = [POINTER(wasmtime_linker_t), POINTER(c_char), c_size_t, POINTER(c_char), c_size_t, POINTER(wasm_functype_t), wasmtime_func_callback_t, c_void_p, CFUNCTYPE(None, c_void_p)] +_wasmtime_linker_define_func.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_define_func.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasm_functype_t), wasmtime_func_callback_t, ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasmtime_linker_define_func(linker: Any, module: Any, module_len: Any, name: Any, name_len: Any, ty: Any, cb: Any, data: Any, finalizer: Any) -> ctypes._Pointer: return _wasmtime_linker_define_func(linker, module, module_len, name, name_len, ty, cb, data, finalizer) # type: ignore _wasmtime_linker_define_func_unchecked = dll.wasmtime_linker_define_func_unchecked -_wasmtime_linker_define_func_unchecked.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_define_func_unchecked.argtypes = [POINTER(wasmtime_linker_t), POINTER(c_char), c_size_t, POINTER(c_char), c_size_t, POINTER(wasm_functype_t), wasmtime_func_unchecked_callback_t, c_void_p, CFUNCTYPE(None, c_void_p)] +_wasmtime_linker_define_func_unchecked.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_define_func_unchecked.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasm_functype_t), wasmtime_func_unchecked_callback_t, ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasmtime_linker_define_func_unchecked(linker: Any, module: Any, module_len: Any, name: Any, name_len: Any, ty: Any, cb: Any, data: Any, finalizer: Any) -> ctypes._Pointer: return _wasmtime_linker_define_func_unchecked(linker, module, module_len, name, name_len, ty, cb, data, finalizer) # type: ignore _wasmtime_linker_define_wasi = dll.wasmtime_linker_define_wasi -_wasmtime_linker_define_wasi.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_define_wasi.argtypes = [POINTER(wasmtime_linker_t)] +_wasmtime_linker_define_wasi.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_define_wasi.argtypes = [ctypes.POINTER(wasmtime_linker_t)] def wasmtime_linker_define_wasi(linker: Any) -> ctypes._Pointer: return _wasmtime_linker_define_wasi(linker) # type: ignore _wasmtime_linker_define_instance = dll.wasmtime_linker_define_instance -_wasmtime_linker_define_instance.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_define_instance.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_context_t), POINTER(c_char), c_size_t, POINTER(wasmtime_instance_t)] +_wasmtime_linker_define_instance.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_define_instance.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_instance_t)] def wasmtime_linker_define_instance(linker: Any, store: Any, name: Any, name_len: Any, instance: Any) -> ctypes._Pointer: return _wasmtime_linker_define_instance(linker, store, name, name_len, instance) # type: ignore _wasmtime_linker_instantiate = dll.wasmtime_linker_instantiate -_wasmtime_linker_instantiate.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_instantiate.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_context_t), POINTER(wasmtime_module_t), POINTER(wasmtime_instance_t), POINTER(POINTER(wasm_trap_t))] +_wasmtime_linker_instantiate.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_instantiate.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_module_t), ctypes.POINTER(wasmtime_instance_t), ctypes.POINTER(ctypes.POINTER(wasm_trap_t))] def wasmtime_linker_instantiate(linker: Any, store: Any, module: Any, instance: Any, trap: Any) -> ctypes._Pointer: return _wasmtime_linker_instantiate(linker, store, module, instance, trap) # type: ignore _wasmtime_linker_module = dll.wasmtime_linker_module -_wasmtime_linker_module.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_module.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_context_t), POINTER(c_char), c_size_t, POINTER(wasmtime_module_t)] +_wasmtime_linker_module.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_module.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_module_t)] def wasmtime_linker_module(linker: Any, store: Any, name: Any, name_len: Any, module: Any) -> ctypes._Pointer: return _wasmtime_linker_module(linker, store, name, name_len, module) # type: ignore _wasmtime_linker_get_default = dll.wasmtime_linker_get_default -_wasmtime_linker_get_default.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_get_default.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_context_t), POINTER(c_char), c_size_t, POINTER(wasmtime_func_t)] +_wasmtime_linker_get_default.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_get_default.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_func_t)] def wasmtime_linker_get_default(linker: Any, store: Any, name: Any, name_len: Any, func: Any) -> ctypes._Pointer: return _wasmtime_linker_get_default(linker, store, name, name_len, func) # type: ignore _wasmtime_linker_get = dll.wasmtime_linker_get -_wasmtime_linker_get.restype = c_bool -_wasmtime_linker_get.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_context_t), POINTER(c_char), c_size_t, POINTER(c_char), c_size_t, POINTER(wasmtime_extern_t)] +_wasmtime_linker_get.restype = ctypes.c_bool +_wasmtime_linker_get.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_extern_t)] def wasmtime_linker_get(linker: Any, store: Any, module: Any, module_len: Any, name: Any, name_len: Any, item: Any) -> bool: return _wasmtime_linker_get(linker, store, module, module_len, name, name_len, item) # type: ignore _wasmtime_linker_instantiate_pre = dll.wasmtime_linker_instantiate_pre -_wasmtime_linker_instantiate_pre.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_instantiate_pre.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_module_t), POINTER(POINTER(wasmtime_instance_pre_t))] +_wasmtime_linker_instantiate_pre.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_instantiate_pre.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_module_t), ctypes.POINTER(ctypes.POINTER(wasmtime_instance_pre_t))] def wasmtime_linker_instantiate_pre(linker: Any, module: Any, instance_pre: Any) -> ctypes._Pointer: return _wasmtime_linker_instantiate_pre(linker, module, instance_pre) # type: ignore _wasmtime_memorytype_new = dll.wasmtime_memorytype_new -_wasmtime_memorytype_new.restype = POINTER(wasmtime_error_t) -_wasmtime_memorytype_new.argtypes = [c_uint64, c_bool, c_uint64, c_bool, c_bool, c_uint8, POINTER(POINTER(wasm_memorytype_t))] +_wasmtime_memorytype_new.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_memorytype_new.argtypes = [ctypes.c_uint64, ctypes.c_bool, ctypes.c_uint64, ctypes.c_bool, ctypes.c_bool, ctypes.c_uint8, ctypes.POINTER(ctypes.POINTER(wasm_memorytype_t))] def wasmtime_memorytype_new(min: Any, max_present: Any, max: Any, is_64: Any, shared: Any, page_size_log2: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_memorytype_new(min, max_present, max, is_64, shared, page_size_log2, ret) # type: ignore _wasmtime_memorytype_minimum = dll.wasmtime_memorytype_minimum -_wasmtime_memorytype_minimum.restype = c_uint64 -_wasmtime_memorytype_minimum.argtypes = [POINTER(wasm_memorytype_t)] +_wasmtime_memorytype_minimum.restype = ctypes.c_uint64 +_wasmtime_memorytype_minimum.argtypes = [ctypes.POINTER(wasm_memorytype_t)] def wasmtime_memorytype_minimum(ty: Any) -> int: return _wasmtime_memorytype_minimum(ty) # type: ignore _wasmtime_memorytype_maximum = dll.wasmtime_memorytype_maximum -_wasmtime_memorytype_maximum.restype = c_bool -_wasmtime_memorytype_maximum.argtypes = [POINTER(wasm_memorytype_t), POINTER(c_uint64)] +_wasmtime_memorytype_maximum.restype = ctypes.c_bool +_wasmtime_memorytype_maximum.argtypes = [ctypes.POINTER(wasm_memorytype_t), ctypes.POINTER(ctypes.c_uint64)] def wasmtime_memorytype_maximum(ty: Any, max: Any) -> bool: return _wasmtime_memorytype_maximum(ty, max) # type: ignore _wasmtime_memorytype_is64 = dll.wasmtime_memorytype_is64 -_wasmtime_memorytype_is64.restype = c_bool -_wasmtime_memorytype_is64.argtypes = [POINTER(wasm_memorytype_t)] +_wasmtime_memorytype_is64.restype = ctypes.c_bool +_wasmtime_memorytype_is64.argtypes = [ctypes.POINTER(wasm_memorytype_t)] def wasmtime_memorytype_is64(ty: Any) -> bool: return _wasmtime_memorytype_is64(ty) # type: ignore _wasmtime_memorytype_isshared = dll.wasmtime_memorytype_isshared -_wasmtime_memorytype_isshared.restype = c_bool -_wasmtime_memorytype_isshared.argtypes = [POINTER(wasm_memorytype_t)] +_wasmtime_memorytype_isshared.restype = ctypes.c_bool +_wasmtime_memorytype_isshared.argtypes = [ctypes.POINTER(wasm_memorytype_t)] def wasmtime_memorytype_isshared(ty: Any) -> bool: return _wasmtime_memorytype_isshared(ty) # type: ignore _wasmtime_memorytype_page_size = dll.wasmtime_memorytype_page_size -_wasmtime_memorytype_page_size.restype = c_uint64 -_wasmtime_memorytype_page_size.argtypes = [POINTER(wasm_memorytype_t)] +_wasmtime_memorytype_page_size.restype = ctypes.c_uint64 +_wasmtime_memorytype_page_size.argtypes = [ctypes.POINTER(wasm_memorytype_t)] def wasmtime_memorytype_page_size(ty: Any) -> int: return _wasmtime_memorytype_page_size(ty) # type: ignore _wasmtime_memorytype_page_size_log2 = dll.wasmtime_memorytype_page_size_log2 -_wasmtime_memorytype_page_size_log2.restype = c_uint8 -_wasmtime_memorytype_page_size_log2.argtypes = [POINTER(wasm_memorytype_t)] -def wasmtime_memorytype_page_size_log2(ty: Any) -> c_uint8: +_wasmtime_memorytype_page_size_log2.restype = ctypes.c_uint8 +_wasmtime_memorytype_page_size_log2.argtypes = [ctypes.POINTER(wasm_memorytype_t)] +def wasmtime_memorytype_page_size_log2(ty: Any) -> ctypes.c_uint8: return _wasmtime_memorytype_page_size_log2(ty) # type: ignore _wasmtime_memory_new = dll.wasmtime_memory_new -_wasmtime_memory_new.restype = POINTER(wasmtime_error_t) -_wasmtime_memory_new.argtypes = [POINTER(wasmtime_context_t), POINTER(wasm_memorytype_t), POINTER(wasmtime_memory_t)] +_wasmtime_memory_new.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_memory_new.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasm_memorytype_t), ctypes.POINTER(wasmtime_memory_t)] def wasmtime_memory_new(store: Any, ty: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_memory_new(store, ty, ret) # type: ignore _wasmtime_memory_type = dll.wasmtime_memory_type -_wasmtime_memory_type.restype = POINTER(wasm_memorytype_t) -_wasmtime_memory_type.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_memory_t)] +_wasmtime_memory_type.restype = ctypes.POINTER(wasm_memorytype_t) +_wasmtime_memory_type.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_memory_t)] def wasmtime_memory_type(store: Any, memory: Any) -> ctypes._Pointer: return _wasmtime_memory_type(store, memory) # type: ignore _wasmtime_memory_data = dll.wasmtime_memory_data -_wasmtime_memory_data.restype = POINTER(c_uint8) -_wasmtime_memory_data.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_memory_t)] +_wasmtime_memory_data.restype = ctypes.POINTER(ctypes.c_uint8) +_wasmtime_memory_data.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_memory_t)] def wasmtime_memory_data(store: Any, memory: Any) -> ctypes._Pointer: return _wasmtime_memory_data(store, memory) # type: ignore _wasmtime_memory_data_size = dll.wasmtime_memory_data_size -_wasmtime_memory_data_size.restype = c_size_t -_wasmtime_memory_data_size.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_memory_t)] +_wasmtime_memory_data_size.restype = ctypes.c_size_t +_wasmtime_memory_data_size.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_memory_t)] def wasmtime_memory_data_size(store: Any, memory: Any) -> int: return _wasmtime_memory_data_size(store, memory) # type: ignore _wasmtime_memory_size = dll.wasmtime_memory_size -_wasmtime_memory_size.restype = c_uint64 -_wasmtime_memory_size.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_memory_t)] +_wasmtime_memory_size.restype = ctypes.c_uint64 +_wasmtime_memory_size.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_memory_t)] def wasmtime_memory_size(store: Any, memory: Any) -> int: return _wasmtime_memory_size(store, memory) # type: ignore _wasmtime_memory_grow = dll.wasmtime_memory_grow -_wasmtime_memory_grow.restype = POINTER(wasmtime_error_t) -_wasmtime_memory_grow.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_memory_t), c_uint64, POINTER(c_uint64)] +_wasmtime_memory_grow.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_memory_grow.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_memory_t), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64)] def wasmtime_memory_grow(store: Any, memory: Any, delta: Any, prev_size: Any) -> ctypes._Pointer: return _wasmtime_memory_grow(store, memory, delta, prev_size) # type: ignore _wasmtime_memory_page_size = dll.wasmtime_memory_page_size -_wasmtime_memory_page_size.restype = c_uint64 -_wasmtime_memory_page_size.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_memory_t)] +_wasmtime_memory_page_size.restype = ctypes.c_uint64 +_wasmtime_memory_page_size.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_memory_t)] def wasmtime_memory_page_size(store: Any, memory: Any) -> int: return _wasmtime_memory_page_size(store, memory) # type: ignore _wasmtime_memory_page_size_log2 = dll.wasmtime_memory_page_size_log2 -_wasmtime_memory_page_size_log2.restype = c_uint8 -_wasmtime_memory_page_size_log2.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_memory_t)] -def wasmtime_memory_page_size_log2(store: Any, memory: Any) -> c_uint8: +_wasmtime_memory_page_size_log2.restype = ctypes.c_uint8 +_wasmtime_memory_page_size_log2.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_memory_t)] +def wasmtime_memory_page_size_log2(store: Any, memory: Any) -> ctypes.c_uint8: return _wasmtime_memory_page_size_log2(store, memory) # type: ignore -class wasmtime_guestprofiler(Structure): +class wasmtime_guestprofiler(ctypes.Structure): pass wasmtime_guestprofiler_t = wasmtime_guestprofiler _wasmtime_guestprofiler_delete = dll.wasmtime_guestprofiler_delete _wasmtime_guestprofiler_delete.restype = None -_wasmtime_guestprofiler_delete.argtypes = [POINTER(wasmtime_guestprofiler_t)] +_wasmtime_guestprofiler_delete.argtypes = [ctypes.POINTER(wasmtime_guestprofiler_t)] def wasmtime_guestprofiler_delete(guestprofiler: Any) -> None: return _wasmtime_guestprofiler_delete(guestprofiler) # type: ignore -class wasmtime_guestprofiler_modules(Structure): +class wasmtime_guestprofiler_modules(ctypes.Structure): _fields_ = [ - ("name", POINTER(wasm_name_t)), - ("mod", POINTER(wasmtime_module_t)), + ("name", ctypes.POINTER(wasm_name_t)), + ("mod", ctypes.POINTER(wasmtime_module_t)), ] name: ctypes._Pointer mod: ctypes._Pointer @@ -3318,60 +3317,60 @@ class wasmtime_guestprofiler_modules(Structure): wasmtime_guestprofiler_modules_t = wasmtime_guestprofiler_modules _wasmtime_guestprofiler_new = dll.wasmtime_guestprofiler_new -_wasmtime_guestprofiler_new.restype = POINTER(wasmtime_guestprofiler_t) -_wasmtime_guestprofiler_new.argtypes = [POINTER(wasm_name_t), c_uint64, POINTER(wasmtime_guestprofiler_modules_t), c_size_t] +_wasmtime_guestprofiler_new.restype = ctypes.POINTER(wasmtime_guestprofiler_t) +_wasmtime_guestprofiler_new.argtypes = [ctypes.POINTER(wasm_name_t), ctypes.c_uint64, ctypes.POINTER(wasmtime_guestprofiler_modules_t), ctypes.c_size_t] def wasmtime_guestprofiler_new(module_name: Any, interval_nanos: Any, modules: Any, modules_len: Any) -> ctypes._Pointer: return _wasmtime_guestprofiler_new(module_name, interval_nanos, modules, modules_len) # type: ignore _wasmtime_guestprofiler_sample = dll.wasmtime_guestprofiler_sample _wasmtime_guestprofiler_sample.restype = None -_wasmtime_guestprofiler_sample.argtypes = [POINTER(wasmtime_guestprofiler_t), POINTER(wasmtime_store_t), c_uint64] +_wasmtime_guestprofiler_sample.argtypes = [ctypes.POINTER(wasmtime_guestprofiler_t), ctypes.POINTER(wasmtime_store_t), ctypes.c_uint64] def wasmtime_guestprofiler_sample(guestprofiler: Any, store: Any, delta_nanos: Any) -> None: return _wasmtime_guestprofiler_sample(guestprofiler, store, delta_nanos) # type: ignore _wasmtime_guestprofiler_finish = dll.wasmtime_guestprofiler_finish -_wasmtime_guestprofiler_finish.restype = POINTER(wasmtime_error_t) -_wasmtime_guestprofiler_finish.argtypes = [POINTER(wasmtime_guestprofiler_t), POINTER(wasm_byte_vec_t)] +_wasmtime_guestprofiler_finish.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_guestprofiler_finish.argtypes = [ctypes.POINTER(wasmtime_guestprofiler_t), ctypes.POINTER(wasm_byte_vec_t)] def wasmtime_guestprofiler_finish(guestprofiler: Any, out: Any) -> ctypes._Pointer: return _wasmtime_guestprofiler_finish(guestprofiler, out) # type: ignore _wasmtime_table_new = dll.wasmtime_table_new -_wasmtime_table_new.restype = POINTER(wasmtime_error_t) -_wasmtime_table_new.argtypes = [POINTER(wasmtime_context_t), POINTER(wasm_tabletype_t), POINTER(wasmtime_val_t), POINTER(wasmtime_table_t)] +_wasmtime_table_new.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_table_new.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasm_tabletype_t), ctypes.POINTER(wasmtime_val_t), ctypes.POINTER(wasmtime_table_t)] def wasmtime_table_new(store: Any, ty: Any, init: Any, table: Any) -> ctypes._Pointer: return _wasmtime_table_new(store, ty, init, table) # type: ignore _wasmtime_table_type = dll.wasmtime_table_type -_wasmtime_table_type.restype = POINTER(wasm_tabletype_t) -_wasmtime_table_type.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_table_t)] +_wasmtime_table_type.restype = ctypes.POINTER(wasm_tabletype_t) +_wasmtime_table_type.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_table_t)] def wasmtime_table_type(store: Any, table: Any) -> ctypes._Pointer: return _wasmtime_table_type(store, table) # type: ignore _wasmtime_table_get = dll.wasmtime_table_get -_wasmtime_table_get.restype = c_bool -_wasmtime_table_get.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_table_t), c_uint64, POINTER(wasmtime_val_t)] +_wasmtime_table_get.restype = ctypes.c_bool +_wasmtime_table_get.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_table_t), ctypes.c_uint64, ctypes.POINTER(wasmtime_val_t)] def wasmtime_table_get(store: Any, table: Any, index: Any, val: Any) -> bool: return _wasmtime_table_get(store, table, index, val) # type: ignore _wasmtime_table_set = dll.wasmtime_table_set -_wasmtime_table_set.restype = POINTER(wasmtime_error_t) -_wasmtime_table_set.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_table_t), c_uint64, POINTER(wasmtime_val_t)] +_wasmtime_table_set.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_table_set.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_table_t), ctypes.c_uint64, ctypes.POINTER(wasmtime_val_t)] def wasmtime_table_set(store: Any, table: Any, index: Any, value: Any) -> ctypes._Pointer: return _wasmtime_table_set(store, table, index, value) # type: ignore _wasmtime_table_size = dll.wasmtime_table_size -_wasmtime_table_size.restype = c_uint64 -_wasmtime_table_size.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_table_t)] +_wasmtime_table_size.restype = ctypes.c_uint64 +_wasmtime_table_size.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_table_t)] def wasmtime_table_size(store: Any, table: Any) -> int: return _wasmtime_table_size(store, table) # type: ignore _wasmtime_table_grow = dll.wasmtime_table_grow -_wasmtime_table_grow.restype = POINTER(wasmtime_error_t) -_wasmtime_table_grow.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_table_t), c_uint64, POINTER(wasmtime_val_t), POINTER(c_uint64)] +_wasmtime_table_grow.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_table_grow.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_table_t), ctypes.c_uint64, ctypes.POINTER(wasmtime_val_t), ctypes.POINTER(ctypes.c_uint64)] def wasmtime_table_grow(store: Any, table: Any, delta: Any, init: Any, prev_size: Any) -> ctypes._Pointer: return _wasmtime_table_grow(store, table, delta, init, prev_size) # type: ignore -wasmtime_trap_code_t = c_uint8 +wasmtime_trap_code_t = ctypes.c_uint8 class wasmtime_trap_code_enum(Enum): WASMTIME_TRAP_CODE_STACK_OVERFLOW = auto() @@ -3397,121 +3396,121 @@ class wasmtime_trap_code_enum(Enum): WASMTIME_TRAP_CODE_DISABLED_OPCODE = auto() _wasmtime_trap_new = dll.wasmtime_trap_new -_wasmtime_trap_new.restype = POINTER(wasm_trap_t) -_wasmtime_trap_new.argtypes = [POINTER(c_char), c_size_t] +_wasmtime_trap_new.restype = ctypes.POINTER(wasm_trap_t) +_wasmtime_trap_new.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.c_size_t] def wasmtime_trap_new(msg: Any, msg_len: Any) -> ctypes._Pointer: return _wasmtime_trap_new(msg, msg_len) # type: ignore _wasmtime_trap_new_code = dll.wasmtime_trap_new_code -_wasmtime_trap_new_code.restype = POINTER(wasm_trap_t) +_wasmtime_trap_new_code.restype = ctypes.POINTER(wasm_trap_t) _wasmtime_trap_new_code.argtypes = [wasmtime_trap_code_t] def wasmtime_trap_new_code(code: Any) -> ctypes._Pointer: return _wasmtime_trap_new_code(code) # type: ignore _wasmtime_trap_code = dll.wasmtime_trap_code -_wasmtime_trap_code.restype = c_bool -_wasmtime_trap_code.argtypes = [POINTER(wasm_trap_t), POINTER(wasmtime_trap_code_t)] +_wasmtime_trap_code.restype = ctypes.c_bool +_wasmtime_trap_code.argtypes = [ctypes.POINTER(wasm_trap_t), ctypes.POINTER(wasmtime_trap_code_t)] def wasmtime_trap_code(arg0: Any, code: Any) -> bool: return _wasmtime_trap_code(arg0, code) # type: ignore _wasmtime_frame_func_name = dll.wasmtime_frame_func_name -_wasmtime_frame_func_name.restype = POINTER(wasm_name_t) -_wasmtime_frame_func_name.argtypes = [POINTER(wasm_frame_t)] +_wasmtime_frame_func_name.restype = ctypes.POINTER(wasm_name_t) +_wasmtime_frame_func_name.argtypes = [ctypes.POINTER(wasm_frame_t)] def wasmtime_frame_func_name(arg0: Any) -> ctypes._Pointer: return _wasmtime_frame_func_name(arg0) # type: ignore _wasmtime_frame_module_name = dll.wasmtime_frame_module_name -_wasmtime_frame_module_name.restype = POINTER(wasm_name_t) -_wasmtime_frame_module_name.argtypes = [POINTER(wasm_frame_t)] +_wasmtime_frame_module_name.restype = ctypes.POINTER(wasm_name_t) +_wasmtime_frame_module_name.argtypes = [ctypes.POINTER(wasm_frame_t)] def wasmtime_frame_module_name(arg0: Any) -> ctypes._Pointer: return _wasmtime_frame_module_name(arg0) # type: ignore _wasmtime_config_async_support_set = dll.wasmtime_config_async_support_set _wasmtime_config_async_support_set.restype = None -_wasmtime_config_async_support_set.argtypes = [POINTER(wasm_config_t), c_bool] +_wasmtime_config_async_support_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_bool] def wasmtime_config_async_support_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_async_support_set(arg0, arg1) # type: ignore _wasmtime_config_async_stack_size_set = dll.wasmtime_config_async_stack_size_set _wasmtime_config_async_stack_size_set.restype = None -_wasmtime_config_async_stack_size_set.argtypes = [POINTER(wasm_config_t), c_uint64] +_wasmtime_config_async_stack_size_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.c_uint64] def wasmtime_config_async_stack_size_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_async_stack_size_set(arg0, arg1) # type: ignore _wasmtime_context_fuel_async_yield_interval = dll.wasmtime_context_fuel_async_yield_interval -_wasmtime_context_fuel_async_yield_interval.restype = POINTER(wasmtime_error_t) -_wasmtime_context_fuel_async_yield_interval.argtypes = [POINTER(wasmtime_context_t), c_uint64] +_wasmtime_context_fuel_async_yield_interval.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_context_fuel_async_yield_interval.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_uint64] def wasmtime_context_fuel_async_yield_interval(context: Any, interval: Any) -> ctypes._Pointer: return _wasmtime_context_fuel_async_yield_interval(context, interval) # type: ignore _wasmtime_context_epoch_deadline_async_yield_and_update = dll.wasmtime_context_epoch_deadline_async_yield_and_update -_wasmtime_context_epoch_deadline_async_yield_and_update.restype = POINTER(wasmtime_error_t) -_wasmtime_context_epoch_deadline_async_yield_and_update.argtypes = [POINTER(wasmtime_context_t), c_uint64] +_wasmtime_context_epoch_deadline_async_yield_and_update.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_context_epoch_deadline_async_yield_and_update.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.c_uint64] def wasmtime_context_epoch_deadline_async_yield_and_update(context: Any, delta: Any) -> ctypes._Pointer: return _wasmtime_context_epoch_deadline_async_yield_and_update(context, delta) # type: ignore -wasmtime_func_async_continuation_callback_t = CFUNCTYPE(c_bool, c_void_p) +wasmtime_func_async_continuation_callback_t = ctypes.CFUNCTYPE(ctypes.c_bool, ctypes.c_void_p) -class wasmtime_async_continuation_t(Structure): +class wasmtime_async_continuation_t(ctypes.Structure): _fields_ = [ ("callback", wasmtime_func_async_continuation_callback_t), - ("env", c_void_p), - ("finalizer", CFUNCTYPE(None, c_void_p)), + ("env", ctypes.c_void_p), + ("finalizer", ctypes.CFUNCTYPE(None, ctypes.c_void_p)), ] callback: ctypes._Pointer env: ctypes._Pointer finalizer: ctypes._Pointer -wasmtime_func_async_callback_t = CFUNCTYPE(None, c_void_p, POINTER(wasmtime_caller_t), POINTER(wasmtime_val_t), c_size_t, POINTER(wasmtime_val_t), c_size_t, POINTER(POINTER(wasm_trap_t)), POINTER(wasmtime_async_continuation_t)) +wasmtime_func_async_callback_t = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.POINTER(wasmtime_caller_t), ctypes.POINTER(wasmtime_val_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_val_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_trap_t)), ctypes.POINTER(wasmtime_async_continuation_t)) -class wasmtime_call_future(Structure): +class wasmtime_call_future(ctypes.Structure): pass wasmtime_call_future_t = wasmtime_call_future _wasmtime_call_future_poll = dll.wasmtime_call_future_poll -_wasmtime_call_future_poll.restype = c_bool -_wasmtime_call_future_poll.argtypes = [POINTER(wasmtime_call_future_t)] +_wasmtime_call_future_poll.restype = ctypes.c_bool +_wasmtime_call_future_poll.argtypes = [ctypes.POINTER(wasmtime_call_future_t)] def wasmtime_call_future_poll(future: Any) -> bool: return _wasmtime_call_future_poll(future) # type: ignore _wasmtime_call_future_delete = dll.wasmtime_call_future_delete _wasmtime_call_future_delete.restype = None -_wasmtime_call_future_delete.argtypes = [POINTER(wasmtime_call_future_t)] +_wasmtime_call_future_delete.argtypes = [ctypes.POINTER(wasmtime_call_future_t)] def wasmtime_call_future_delete(future: Any) -> None: return _wasmtime_call_future_delete(future) # type: ignore _wasmtime_func_call_async = dll.wasmtime_func_call_async -_wasmtime_func_call_async.restype = POINTER(wasmtime_call_future_t) -_wasmtime_func_call_async.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_func_t), POINTER(wasmtime_val_t), c_size_t, POINTER(wasmtime_val_t), c_size_t, POINTER(POINTER(wasm_trap_t)), POINTER(POINTER(wasmtime_error_t))] +_wasmtime_func_call_async.restype = ctypes.POINTER(wasmtime_call_future_t) +_wasmtime_func_call_async.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_func_t), ctypes.POINTER(wasmtime_val_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_val_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasm_trap_t)), ctypes.POINTER(ctypes.POINTER(wasmtime_error_t))] def wasmtime_func_call_async(context: Any, func: Any, args: Any, nargs: Any, results: Any, nresults: Any, trap_ret: Any, error_ret: Any) -> ctypes._Pointer: return _wasmtime_func_call_async(context, func, args, nargs, results, nresults, trap_ret, error_ret) # type: ignore _wasmtime_linker_define_async_func = dll.wasmtime_linker_define_async_func -_wasmtime_linker_define_async_func.restype = POINTER(wasmtime_error_t) -_wasmtime_linker_define_async_func.argtypes = [POINTER(wasmtime_linker_t), POINTER(c_char), c_size_t, POINTER(c_char), c_size_t, POINTER(wasm_functype_t), wasmtime_func_async_callback_t, c_void_p, CFUNCTYPE(None, c_void_p)] +_wasmtime_linker_define_async_func.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_linker_define_async_func.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasm_functype_t), wasmtime_func_async_callback_t, ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasmtime_linker_define_async_func(linker: Any, module: Any, module_len: Any, name: Any, name_len: Any, ty: Any, cb: Any, data: Any, finalizer: Any) -> ctypes._Pointer: return _wasmtime_linker_define_async_func(linker, module, module_len, name, name_len, ty, cb, data, finalizer) # type: ignore _wasmtime_linker_instantiate_async = dll.wasmtime_linker_instantiate_async -_wasmtime_linker_instantiate_async.restype = POINTER(wasmtime_call_future_t) -_wasmtime_linker_instantiate_async.argtypes = [POINTER(wasmtime_linker_t), POINTER(wasmtime_context_t), POINTER(wasmtime_module_t), POINTER(wasmtime_instance_t), POINTER(POINTER(wasm_trap_t)), POINTER(POINTER(wasmtime_error_t))] +_wasmtime_linker_instantiate_async.restype = ctypes.POINTER(wasmtime_call_future_t) +_wasmtime_linker_instantiate_async.argtypes = [ctypes.POINTER(wasmtime_linker_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_module_t), ctypes.POINTER(wasmtime_instance_t), ctypes.POINTER(ctypes.POINTER(wasm_trap_t)), ctypes.POINTER(ctypes.POINTER(wasmtime_error_t))] def wasmtime_linker_instantiate_async(linker: Any, store: Any, module: Any, instance: Any, trap_ret: Any, error_ret: Any) -> ctypes._Pointer: return _wasmtime_linker_instantiate_async(linker, store, module, instance, trap_ret, error_ret) # type: ignore _wasmtime_instance_pre_instantiate_async = dll.wasmtime_instance_pre_instantiate_async -_wasmtime_instance_pre_instantiate_async.restype = POINTER(wasmtime_call_future_t) -_wasmtime_instance_pre_instantiate_async.argtypes = [POINTER(wasmtime_instance_pre_t), POINTER(wasmtime_context_t), POINTER(wasmtime_instance_t), POINTER(POINTER(wasm_trap_t)), POINTER(POINTER(wasmtime_error_t))] +_wasmtime_instance_pre_instantiate_async.restype = ctypes.POINTER(wasmtime_call_future_t) +_wasmtime_instance_pre_instantiate_async.argtypes = [ctypes.POINTER(wasmtime_instance_pre_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_instance_t), ctypes.POINTER(ctypes.POINTER(wasm_trap_t)), ctypes.POINTER(ctypes.POINTER(wasmtime_error_t))] def wasmtime_instance_pre_instantiate_async(instance_pre: Any, store: Any, instance: Any, trap_ret: Any, error_ret: Any) -> ctypes._Pointer: return _wasmtime_instance_pre_instantiate_async(instance_pre, store, instance, trap_ret, error_ret) # type: ignore -wasmtime_stack_memory_get_callback_t = CFUNCTYPE(c_size_t, c_void_p, POINTER(c_size_t)) +wasmtime_stack_memory_get_callback_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.POINTER(ctypes.c_size_t)) -class wasmtime_stack_memory(Structure): +class wasmtime_stack_memory(ctypes.Structure): _fields_ = [ - ("env", c_void_p), + ("env", ctypes.c_void_p), ("get_stack_memory", wasmtime_stack_memory_get_callback_t), - ("finalizer", CFUNCTYPE(None, c_void_p)), + ("finalizer", ctypes.CFUNCTYPE(None, ctypes.c_void_p)), ] env: ctypes._Pointer get_stack_memory: ctypes._Pointer @@ -3519,13 +3518,13 @@ class wasmtime_stack_memory(Structure): wasmtime_stack_memory_t = wasmtime_stack_memory -wasmtime_new_stack_memory_callback_t = CFUNCTYPE(c_size_t, c_void_p, c_size_t, c_bool, POINTER(wasmtime_stack_memory_t)) +wasmtime_new_stack_memory_callback_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.c_size_t, ctypes.c_bool, ctypes.POINTER(wasmtime_stack_memory_t)) -class wasmtime_stack_creator(Structure): +class wasmtime_stack_creator(ctypes.Structure): _fields_ = [ - ("env", c_void_p), + ("env", ctypes.c_void_p), ("new_stack", wasmtime_new_stack_memory_callback_t), - ("finalizer", CFUNCTYPE(None, c_void_p)), + ("finalizer", ctypes.CFUNCTYPE(None, ctypes.c_void_p)), ] env: ctypes._Pointer new_stack: ctypes._Pointer @@ -3535,384 +3534,384 @@ class wasmtime_stack_creator(Structure): _wasmtime_config_host_stack_creator_set = dll.wasmtime_config_host_stack_creator_set _wasmtime_config_host_stack_creator_set.restype = None -_wasmtime_config_host_stack_creator_set.argtypes = [POINTER(wasm_config_t), POINTER(wasmtime_stack_creator_t)] +_wasmtime_config_host_stack_creator_set.argtypes = [ctypes.POINTER(wasm_config_t), ctypes.POINTER(wasmtime_stack_creator_t)] def wasmtime_config_host_stack_creator_set(arg0: Any, arg1: Any) -> None: return _wasmtime_config_host_stack_creator_set(arg0, arg1) # type: ignore -class wasmtime_component_resource_type(Structure): +class wasmtime_component_resource_type(ctypes.Structure): pass wasmtime_component_resource_type_t = wasmtime_component_resource_type _wasmtime_component_resource_type_new_host = dll.wasmtime_component_resource_type_new_host -_wasmtime_component_resource_type_new_host.restype = POINTER(wasmtime_component_resource_type_t) -_wasmtime_component_resource_type_new_host.argtypes = [c_uint32] +_wasmtime_component_resource_type_new_host.restype = ctypes.POINTER(wasmtime_component_resource_type_t) +_wasmtime_component_resource_type_new_host.argtypes = [ctypes.c_uint32] def wasmtime_component_resource_type_new_host(ty: Any) -> ctypes._Pointer: return _wasmtime_component_resource_type_new_host(ty) # type: ignore _wasmtime_component_resource_type_clone = dll.wasmtime_component_resource_type_clone -_wasmtime_component_resource_type_clone.restype = POINTER(wasmtime_component_resource_type_t) -_wasmtime_component_resource_type_clone.argtypes = [POINTER(wasmtime_component_resource_type_t)] +_wasmtime_component_resource_type_clone.restype = ctypes.POINTER(wasmtime_component_resource_type_t) +_wasmtime_component_resource_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_resource_type_t)] def wasmtime_component_resource_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_resource_type_clone(ty) # type: ignore _wasmtime_component_resource_type_equal = dll.wasmtime_component_resource_type_equal -_wasmtime_component_resource_type_equal.restype = c_bool -_wasmtime_component_resource_type_equal.argtypes = [POINTER(wasmtime_component_resource_type_t), POINTER(wasmtime_component_resource_type_t)] +_wasmtime_component_resource_type_equal.restype = ctypes.c_bool +_wasmtime_component_resource_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_resource_type_t), ctypes.POINTER(wasmtime_component_resource_type_t)] def wasmtime_component_resource_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_resource_type_equal(a, b) # type: ignore _wasmtime_component_resource_type_delete = dll.wasmtime_component_resource_type_delete _wasmtime_component_resource_type_delete.restype = None -_wasmtime_component_resource_type_delete.argtypes = [POINTER(wasmtime_component_resource_type_t)] +_wasmtime_component_resource_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_resource_type_t)] def wasmtime_component_resource_type_delete(resource: Any) -> None: return _wasmtime_component_resource_type_delete(resource) # type: ignore -class wasmtime_component_valtype_t(Structure): +class wasmtime_component_valtype_t(ctypes.Structure): pass -class wasmtime_component_list_type(Structure): +class wasmtime_component_list_type(ctypes.Structure): pass wasmtime_component_list_type_t = wasmtime_component_list_type _wasmtime_component_list_type_clone = dll.wasmtime_component_list_type_clone -_wasmtime_component_list_type_clone.restype = POINTER(wasmtime_component_list_type_t) -_wasmtime_component_list_type_clone.argtypes = [POINTER(wasmtime_component_list_type_t)] +_wasmtime_component_list_type_clone.restype = ctypes.POINTER(wasmtime_component_list_type_t) +_wasmtime_component_list_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_list_type_t)] def wasmtime_component_list_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_list_type_clone(ty) # type: ignore _wasmtime_component_list_type_equal = dll.wasmtime_component_list_type_equal -_wasmtime_component_list_type_equal.restype = c_bool -_wasmtime_component_list_type_equal.argtypes = [POINTER(wasmtime_component_list_type_t), POINTER(wasmtime_component_list_type_t)] +_wasmtime_component_list_type_equal.restype = ctypes.c_bool +_wasmtime_component_list_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_list_type_t), ctypes.POINTER(wasmtime_component_list_type_t)] def wasmtime_component_list_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_list_type_equal(a, b) # type: ignore _wasmtime_component_list_type_delete = dll.wasmtime_component_list_type_delete _wasmtime_component_list_type_delete.restype = None -_wasmtime_component_list_type_delete.argtypes = [POINTER(wasmtime_component_list_type_t)] +_wasmtime_component_list_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_list_type_t)] def wasmtime_component_list_type_delete(ptr: Any) -> None: return _wasmtime_component_list_type_delete(ptr) # type: ignore _wasmtime_component_list_type_element = dll.wasmtime_component_list_type_element _wasmtime_component_list_type_element.restype = None -_wasmtime_component_list_type_element.argtypes = [POINTER(wasmtime_component_list_type_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_list_type_element.argtypes = [ctypes.POINTER(wasmtime_component_list_type_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_list_type_element(ty: Any, type_ret: Any) -> None: return _wasmtime_component_list_type_element(ty, type_ret) # type: ignore -class wasmtime_component_record_type(Structure): +class wasmtime_component_record_type(ctypes.Structure): pass wasmtime_component_record_type_t = wasmtime_component_record_type _wasmtime_component_record_type_clone = dll.wasmtime_component_record_type_clone -_wasmtime_component_record_type_clone.restype = POINTER(wasmtime_component_record_type_t) -_wasmtime_component_record_type_clone.argtypes = [POINTER(wasmtime_component_record_type_t)] +_wasmtime_component_record_type_clone.restype = ctypes.POINTER(wasmtime_component_record_type_t) +_wasmtime_component_record_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_record_type_t)] def wasmtime_component_record_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_record_type_clone(ty) # type: ignore _wasmtime_component_record_type_equal = dll.wasmtime_component_record_type_equal -_wasmtime_component_record_type_equal.restype = c_bool -_wasmtime_component_record_type_equal.argtypes = [POINTER(wasmtime_component_record_type_t), POINTER(wasmtime_component_record_type_t)] +_wasmtime_component_record_type_equal.restype = ctypes.c_bool +_wasmtime_component_record_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_record_type_t), ctypes.POINTER(wasmtime_component_record_type_t)] def wasmtime_component_record_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_record_type_equal(a, b) # type: ignore _wasmtime_component_record_type_delete = dll.wasmtime_component_record_type_delete _wasmtime_component_record_type_delete.restype = None -_wasmtime_component_record_type_delete.argtypes = [POINTER(wasmtime_component_record_type_t)] +_wasmtime_component_record_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_record_type_t)] def wasmtime_component_record_type_delete(ptr: Any) -> None: return _wasmtime_component_record_type_delete(ptr) # type: ignore _wasmtime_component_record_type_field_count = dll.wasmtime_component_record_type_field_count -_wasmtime_component_record_type_field_count.restype = c_size_t -_wasmtime_component_record_type_field_count.argtypes = [POINTER(wasmtime_component_record_type_t)] +_wasmtime_component_record_type_field_count.restype = ctypes.c_size_t +_wasmtime_component_record_type_field_count.argtypes = [ctypes.POINTER(wasmtime_component_record_type_t)] def wasmtime_component_record_type_field_count(ty: Any) -> int: return _wasmtime_component_record_type_field_count(ty) # type: ignore _wasmtime_component_record_type_field_nth = dll.wasmtime_component_record_type_field_nth -_wasmtime_component_record_type_field_nth.restype = c_bool -_wasmtime_component_record_type_field_nth.argtypes = [POINTER(wasmtime_component_record_type_t), c_size_t, POINTER(POINTER(c_char)), POINTER(c_size_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_record_type_field_nth.restype = ctypes.c_bool +_wasmtime_component_record_type_field_nth.argtypes = [ctypes.POINTER(wasmtime_component_record_type_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_record_type_field_nth(ty: Any, nth: Any, name_ret: Any, name_len_ret: Any, type_ret: Any) -> bool: return _wasmtime_component_record_type_field_nth(ty, nth, name_ret, name_len_ret, type_ret) # type: ignore -class wasmtime_component_tuple_type(Structure): +class wasmtime_component_tuple_type(ctypes.Structure): pass wasmtime_component_tuple_type_t = wasmtime_component_tuple_type _wasmtime_component_tuple_type_clone = dll.wasmtime_component_tuple_type_clone -_wasmtime_component_tuple_type_clone.restype = POINTER(wasmtime_component_tuple_type_t) -_wasmtime_component_tuple_type_clone.argtypes = [POINTER(wasmtime_component_tuple_type_t)] +_wasmtime_component_tuple_type_clone.restype = ctypes.POINTER(wasmtime_component_tuple_type_t) +_wasmtime_component_tuple_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_tuple_type_t)] def wasmtime_component_tuple_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_tuple_type_clone(ty) # type: ignore _wasmtime_component_tuple_type_equal = dll.wasmtime_component_tuple_type_equal -_wasmtime_component_tuple_type_equal.restype = c_bool -_wasmtime_component_tuple_type_equal.argtypes = [POINTER(wasmtime_component_tuple_type_t), POINTER(wasmtime_component_tuple_type_t)] +_wasmtime_component_tuple_type_equal.restype = ctypes.c_bool +_wasmtime_component_tuple_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_tuple_type_t), ctypes.POINTER(wasmtime_component_tuple_type_t)] def wasmtime_component_tuple_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_tuple_type_equal(a, b) # type: ignore _wasmtime_component_tuple_type_delete = dll.wasmtime_component_tuple_type_delete _wasmtime_component_tuple_type_delete.restype = None -_wasmtime_component_tuple_type_delete.argtypes = [POINTER(wasmtime_component_tuple_type_t)] +_wasmtime_component_tuple_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_tuple_type_t)] def wasmtime_component_tuple_type_delete(ptr: Any) -> None: return _wasmtime_component_tuple_type_delete(ptr) # type: ignore _wasmtime_component_tuple_type_types_count = dll.wasmtime_component_tuple_type_types_count -_wasmtime_component_tuple_type_types_count.restype = c_size_t -_wasmtime_component_tuple_type_types_count.argtypes = [POINTER(wasmtime_component_tuple_type_t)] +_wasmtime_component_tuple_type_types_count.restype = ctypes.c_size_t +_wasmtime_component_tuple_type_types_count.argtypes = [ctypes.POINTER(wasmtime_component_tuple_type_t)] def wasmtime_component_tuple_type_types_count(ty: Any) -> int: return _wasmtime_component_tuple_type_types_count(ty) # type: ignore _wasmtime_component_tuple_type_types_nth = dll.wasmtime_component_tuple_type_types_nth -_wasmtime_component_tuple_type_types_nth.restype = c_bool -_wasmtime_component_tuple_type_types_nth.argtypes = [POINTER(wasmtime_component_tuple_type_t), c_size_t, POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_tuple_type_types_nth.restype = ctypes.c_bool +_wasmtime_component_tuple_type_types_nth.argtypes = [ctypes.POINTER(wasmtime_component_tuple_type_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_tuple_type_types_nth(ty: Any, nth: Any, type_ret: Any) -> bool: return _wasmtime_component_tuple_type_types_nth(ty, nth, type_ret) # type: ignore -class wasmtime_component_variant_type(Structure): +class wasmtime_component_variant_type(ctypes.Structure): pass wasmtime_component_variant_type_t = wasmtime_component_variant_type _wasmtime_component_variant_type_clone = dll.wasmtime_component_variant_type_clone -_wasmtime_component_variant_type_clone.restype = POINTER(wasmtime_component_variant_type_t) -_wasmtime_component_variant_type_clone.argtypes = [POINTER(wasmtime_component_variant_type_t)] +_wasmtime_component_variant_type_clone.restype = ctypes.POINTER(wasmtime_component_variant_type_t) +_wasmtime_component_variant_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_variant_type_t)] def wasmtime_component_variant_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_variant_type_clone(ty) # type: ignore _wasmtime_component_variant_type_equal = dll.wasmtime_component_variant_type_equal -_wasmtime_component_variant_type_equal.restype = c_bool -_wasmtime_component_variant_type_equal.argtypes = [POINTER(wasmtime_component_variant_type_t), POINTER(wasmtime_component_variant_type_t)] +_wasmtime_component_variant_type_equal.restype = ctypes.c_bool +_wasmtime_component_variant_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_variant_type_t), ctypes.POINTER(wasmtime_component_variant_type_t)] def wasmtime_component_variant_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_variant_type_equal(a, b) # type: ignore _wasmtime_component_variant_type_delete = dll.wasmtime_component_variant_type_delete _wasmtime_component_variant_type_delete.restype = None -_wasmtime_component_variant_type_delete.argtypes = [POINTER(wasmtime_component_variant_type_t)] +_wasmtime_component_variant_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_variant_type_t)] def wasmtime_component_variant_type_delete(ptr: Any) -> None: return _wasmtime_component_variant_type_delete(ptr) # type: ignore _wasmtime_component_variant_type_case_count = dll.wasmtime_component_variant_type_case_count -_wasmtime_component_variant_type_case_count.restype = c_size_t -_wasmtime_component_variant_type_case_count.argtypes = [POINTER(wasmtime_component_variant_type_t)] +_wasmtime_component_variant_type_case_count.restype = ctypes.c_size_t +_wasmtime_component_variant_type_case_count.argtypes = [ctypes.POINTER(wasmtime_component_variant_type_t)] def wasmtime_component_variant_type_case_count(ty: Any) -> int: return _wasmtime_component_variant_type_case_count(ty) # type: ignore _wasmtime_component_variant_type_case_nth = dll.wasmtime_component_variant_type_case_nth -_wasmtime_component_variant_type_case_nth.restype = c_bool -_wasmtime_component_variant_type_case_nth.argtypes = [POINTER(wasmtime_component_variant_type_t), c_size_t, POINTER(POINTER(c_char)), POINTER(c_size_t), POINTER(c_bool), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_variant_type_case_nth.restype = ctypes.c_bool +_wasmtime_component_variant_type_case_nth.argtypes = [ctypes.POINTER(wasmtime_component_variant_type_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(ctypes.c_bool), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_variant_type_case_nth(ty: Any, nth: Any, name_ret: Any, name_len_ret: Any, has_payload_ret: Any, payload_ret: Any) -> bool: return _wasmtime_component_variant_type_case_nth(ty, nth, name_ret, name_len_ret, has_payload_ret, payload_ret) # type: ignore -class wasmtime_component_enum_type(Structure): +class wasmtime_component_enum_type(ctypes.Structure): pass wasmtime_component_enum_type_t = wasmtime_component_enum_type _wasmtime_component_enum_type_clone = dll.wasmtime_component_enum_type_clone -_wasmtime_component_enum_type_clone.restype = POINTER(wasmtime_component_enum_type_t) -_wasmtime_component_enum_type_clone.argtypes = [POINTER(wasmtime_component_enum_type_t)] +_wasmtime_component_enum_type_clone.restype = ctypes.POINTER(wasmtime_component_enum_type_t) +_wasmtime_component_enum_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_enum_type_t)] def wasmtime_component_enum_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_enum_type_clone(ty) # type: ignore _wasmtime_component_enum_type_equal = dll.wasmtime_component_enum_type_equal -_wasmtime_component_enum_type_equal.restype = c_bool -_wasmtime_component_enum_type_equal.argtypes = [POINTER(wasmtime_component_enum_type_t), POINTER(wasmtime_component_enum_type_t)] +_wasmtime_component_enum_type_equal.restype = ctypes.c_bool +_wasmtime_component_enum_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_enum_type_t), ctypes.POINTER(wasmtime_component_enum_type_t)] def wasmtime_component_enum_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_enum_type_equal(a, b) # type: ignore _wasmtime_component_enum_type_delete = dll.wasmtime_component_enum_type_delete _wasmtime_component_enum_type_delete.restype = None -_wasmtime_component_enum_type_delete.argtypes = [POINTER(wasmtime_component_enum_type_t)] +_wasmtime_component_enum_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_enum_type_t)] def wasmtime_component_enum_type_delete(ptr: Any) -> None: return _wasmtime_component_enum_type_delete(ptr) # type: ignore _wasmtime_component_enum_type_names_count = dll.wasmtime_component_enum_type_names_count -_wasmtime_component_enum_type_names_count.restype = c_size_t -_wasmtime_component_enum_type_names_count.argtypes = [POINTER(wasmtime_component_enum_type_t)] +_wasmtime_component_enum_type_names_count.restype = ctypes.c_size_t +_wasmtime_component_enum_type_names_count.argtypes = [ctypes.POINTER(wasmtime_component_enum_type_t)] def wasmtime_component_enum_type_names_count(ty: Any) -> int: return _wasmtime_component_enum_type_names_count(ty) # type: ignore _wasmtime_component_enum_type_names_nth = dll.wasmtime_component_enum_type_names_nth -_wasmtime_component_enum_type_names_nth.restype = c_bool -_wasmtime_component_enum_type_names_nth.argtypes = [POINTER(wasmtime_component_enum_type_t), c_size_t, POINTER(POINTER(c_char)), POINTER(c_size_t)] +_wasmtime_component_enum_type_names_nth.restype = ctypes.c_bool +_wasmtime_component_enum_type_names_nth.argtypes = [ctypes.POINTER(wasmtime_component_enum_type_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_size_t)] def wasmtime_component_enum_type_names_nth(ty: Any, nth: Any, name_ret: Any, name_len_ret: Any) -> bool: return _wasmtime_component_enum_type_names_nth(ty, nth, name_ret, name_len_ret) # type: ignore -class wasmtime_component_option_type(Structure): +class wasmtime_component_option_type(ctypes.Structure): pass wasmtime_component_option_type_t = wasmtime_component_option_type _wasmtime_component_option_type_clone = dll.wasmtime_component_option_type_clone -_wasmtime_component_option_type_clone.restype = POINTER(wasmtime_component_option_type_t) -_wasmtime_component_option_type_clone.argtypes = [POINTER(wasmtime_component_option_type_t)] +_wasmtime_component_option_type_clone.restype = ctypes.POINTER(wasmtime_component_option_type_t) +_wasmtime_component_option_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_option_type_t)] def wasmtime_component_option_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_option_type_clone(ty) # type: ignore _wasmtime_component_option_type_equal = dll.wasmtime_component_option_type_equal -_wasmtime_component_option_type_equal.restype = c_bool -_wasmtime_component_option_type_equal.argtypes = [POINTER(wasmtime_component_option_type_t), POINTER(wasmtime_component_option_type_t)] +_wasmtime_component_option_type_equal.restype = ctypes.c_bool +_wasmtime_component_option_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_option_type_t), ctypes.POINTER(wasmtime_component_option_type_t)] def wasmtime_component_option_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_option_type_equal(a, b) # type: ignore _wasmtime_component_option_type_delete = dll.wasmtime_component_option_type_delete _wasmtime_component_option_type_delete.restype = None -_wasmtime_component_option_type_delete.argtypes = [POINTER(wasmtime_component_option_type_t)] +_wasmtime_component_option_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_option_type_t)] def wasmtime_component_option_type_delete(ptr: Any) -> None: return _wasmtime_component_option_type_delete(ptr) # type: ignore _wasmtime_component_option_type_ty = dll.wasmtime_component_option_type_ty _wasmtime_component_option_type_ty.restype = None -_wasmtime_component_option_type_ty.argtypes = [POINTER(wasmtime_component_option_type_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_option_type_ty.argtypes = [ctypes.POINTER(wasmtime_component_option_type_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_option_type_ty(ty: Any, type_ret: Any) -> None: return _wasmtime_component_option_type_ty(ty, type_ret) # type: ignore -class wasmtime_component_result_type(Structure): +class wasmtime_component_result_type(ctypes.Structure): pass wasmtime_component_result_type_t = wasmtime_component_result_type _wasmtime_component_result_type_clone = dll.wasmtime_component_result_type_clone -_wasmtime_component_result_type_clone.restype = POINTER(wasmtime_component_result_type_t) -_wasmtime_component_result_type_clone.argtypes = [POINTER(wasmtime_component_result_type_t)] +_wasmtime_component_result_type_clone.restype = ctypes.POINTER(wasmtime_component_result_type_t) +_wasmtime_component_result_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_result_type_t)] def wasmtime_component_result_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_result_type_clone(ty) # type: ignore _wasmtime_component_result_type_equal = dll.wasmtime_component_result_type_equal -_wasmtime_component_result_type_equal.restype = c_bool -_wasmtime_component_result_type_equal.argtypes = [POINTER(wasmtime_component_result_type_t), POINTER(wasmtime_component_result_type_t)] +_wasmtime_component_result_type_equal.restype = ctypes.c_bool +_wasmtime_component_result_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_result_type_t), ctypes.POINTER(wasmtime_component_result_type_t)] def wasmtime_component_result_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_result_type_equal(a, b) # type: ignore _wasmtime_component_result_type_delete = dll.wasmtime_component_result_type_delete _wasmtime_component_result_type_delete.restype = None -_wasmtime_component_result_type_delete.argtypes = [POINTER(wasmtime_component_result_type_t)] +_wasmtime_component_result_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_result_type_t)] def wasmtime_component_result_type_delete(ptr: Any) -> None: return _wasmtime_component_result_type_delete(ptr) # type: ignore _wasmtime_component_result_type_ok = dll.wasmtime_component_result_type_ok -_wasmtime_component_result_type_ok.restype = c_bool -_wasmtime_component_result_type_ok.argtypes = [POINTER(wasmtime_component_result_type_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_result_type_ok.restype = ctypes.c_bool +_wasmtime_component_result_type_ok.argtypes = [ctypes.POINTER(wasmtime_component_result_type_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_result_type_ok(ty: Any, type_ret: Any) -> bool: return _wasmtime_component_result_type_ok(ty, type_ret) # type: ignore _wasmtime_component_result_type_err = dll.wasmtime_component_result_type_err -_wasmtime_component_result_type_err.restype = c_bool -_wasmtime_component_result_type_err.argtypes = [POINTER(wasmtime_component_result_type_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_result_type_err.restype = ctypes.c_bool +_wasmtime_component_result_type_err.argtypes = [ctypes.POINTER(wasmtime_component_result_type_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_result_type_err(ty: Any, type_ret: Any) -> bool: return _wasmtime_component_result_type_err(ty, type_ret) # type: ignore -class wasmtime_component_flags_type(Structure): +class wasmtime_component_flags_type(ctypes.Structure): pass wasmtime_component_flags_type_t = wasmtime_component_flags_type _wasmtime_component_flags_type_clone = dll.wasmtime_component_flags_type_clone -_wasmtime_component_flags_type_clone.restype = POINTER(wasmtime_component_flags_type_t) -_wasmtime_component_flags_type_clone.argtypes = [POINTER(wasmtime_component_flags_type_t)] +_wasmtime_component_flags_type_clone.restype = ctypes.POINTER(wasmtime_component_flags_type_t) +_wasmtime_component_flags_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_flags_type_t)] def wasmtime_component_flags_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_flags_type_clone(ty) # type: ignore _wasmtime_component_flags_type_equal = dll.wasmtime_component_flags_type_equal -_wasmtime_component_flags_type_equal.restype = c_bool -_wasmtime_component_flags_type_equal.argtypes = [POINTER(wasmtime_component_flags_type_t), POINTER(wasmtime_component_flags_type_t)] +_wasmtime_component_flags_type_equal.restype = ctypes.c_bool +_wasmtime_component_flags_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_flags_type_t), ctypes.POINTER(wasmtime_component_flags_type_t)] def wasmtime_component_flags_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_flags_type_equal(a, b) # type: ignore _wasmtime_component_flags_type_delete = dll.wasmtime_component_flags_type_delete _wasmtime_component_flags_type_delete.restype = None -_wasmtime_component_flags_type_delete.argtypes = [POINTER(wasmtime_component_flags_type_t)] +_wasmtime_component_flags_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_flags_type_t)] def wasmtime_component_flags_type_delete(ptr: Any) -> None: return _wasmtime_component_flags_type_delete(ptr) # type: ignore _wasmtime_component_flags_type_names_count = dll.wasmtime_component_flags_type_names_count -_wasmtime_component_flags_type_names_count.restype = c_size_t -_wasmtime_component_flags_type_names_count.argtypes = [POINTER(wasmtime_component_flags_type_t)] +_wasmtime_component_flags_type_names_count.restype = ctypes.c_size_t +_wasmtime_component_flags_type_names_count.argtypes = [ctypes.POINTER(wasmtime_component_flags_type_t)] def wasmtime_component_flags_type_names_count(ty: Any) -> int: return _wasmtime_component_flags_type_names_count(ty) # type: ignore _wasmtime_component_flags_type_names_nth = dll.wasmtime_component_flags_type_names_nth -_wasmtime_component_flags_type_names_nth.restype = c_bool -_wasmtime_component_flags_type_names_nth.argtypes = [POINTER(wasmtime_component_flags_type_t), c_size_t, POINTER(POINTER(c_char)), POINTER(c_size_t)] +_wasmtime_component_flags_type_names_nth.restype = ctypes.c_bool +_wasmtime_component_flags_type_names_nth.argtypes = [ctypes.POINTER(wasmtime_component_flags_type_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_size_t)] def wasmtime_component_flags_type_names_nth(ty: Any, nth: Any, name_ret: Any, name_len_ret: Any) -> bool: return _wasmtime_component_flags_type_names_nth(ty, nth, name_ret, name_len_ret) # type: ignore -class wasmtime_component_future_type(Structure): +class wasmtime_component_future_type(ctypes.Structure): pass wasmtime_component_future_type_t = wasmtime_component_future_type _wasmtime_component_future_type_clone = dll.wasmtime_component_future_type_clone -_wasmtime_component_future_type_clone.restype = POINTER(wasmtime_component_future_type_t) -_wasmtime_component_future_type_clone.argtypes = [POINTER(wasmtime_component_future_type_t)] +_wasmtime_component_future_type_clone.restype = ctypes.POINTER(wasmtime_component_future_type_t) +_wasmtime_component_future_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_future_type_t)] def wasmtime_component_future_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_future_type_clone(ty) # type: ignore _wasmtime_component_future_type_equal = dll.wasmtime_component_future_type_equal -_wasmtime_component_future_type_equal.restype = c_bool -_wasmtime_component_future_type_equal.argtypes = [POINTER(wasmtime_component_future_type_t), POINTER(wasmtime_component_future_type_t)] +_wasmtime_component_future_type_equal.restype = ctypes.c_bool +_wasmtime_component_future_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_future_type_t), ctypes.POINTER(wasmtime_component_future_type_t)] def wasmtime_component_future_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_future_type_equal(a, b) # type: ignore _wasmtime_component_future_type_delete = dll.wasmtime_component_future_type_delete _wasmtime_component_future_type_delete.restype = None -_wasmtime_component_future_type_delete.argtypes = [POINTER(wasmtime_component_future_type_t)] +_wasmtime_component_future_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_future_type_t)] def wasmtime_component_future_type_delete(ptr: Any) -> None: return _wasmtime_component_future_type_delete(ptr) # type: ignore _wasmtime_component_future_type_ty = dll.wasmtime_component_future_type_ty -_wasmtime_component_future_type_ty.restype = c_bool -_wasmtime_component_future_type_ty.argtypes = [POINTER(wasmtime_component_future_type_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_future_type_ty.restype = ctypes.c_bool +_wasmtime_component_future_type_ty.argtypes = [ctypes.POINTER(wasmtime_component_future_type_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_future_type_ty(ty: Any, type_ret: Any) -> bool: return _wasmtime_component_future_type_ty(ty, type_ret) # type: ignore -class wasmtime_component_stream_type(Structure): +class wasmtime_component_stream_type(ctypes.Structure): pass wasmtime_component_stream_type_t = wasmtime_component_stream_type _wasmtime_component_stream_type_clone = dll.wasmtime_component_stream_type_clone -_wasmtime_component_stream_type_clone.restype = POINTER(wasmtime_component_stream_type_t) -_wasmtime_component_stream_type_clone.argtypes = [POINTER(wasmtime_component_stream_type_t)] +_wasmtime_component_stream_type_clone.restype = ctypes.POINTER(wasmtime_component_stream_type_t) +_wasmtime_component_stream_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_stream_type_t)] def wasmtime_component_stream_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_stream_type_clone(ty) # type: ignore _wasmtime_component_stream_type_equal = dll.wasmtime_component_stream_type_equal -_wasmtime_component_stream_type_equal.restype = c_bool -_wasmtime_component_stream_type_equal.argtypes = [POINTER(wasmtime_component_stream_type_t), POINTER(wasmtime_component_stream_type_t)] +_wasmtime_component_stream_type_equal.restype = ctypes.c_bool +_wasmtime_component_stream_type_equal.argtypes = [ctypes.POINTER(wasmtime_component_stream_type_t), ctypes.POINTER(wasmtime_component_stream_type_t)] def wasmtime_component_stream_type_equal(a: Any, b: Any) -> bool: return _wasmtime_component_stream_type_equal(a, b) # type: ignore _wasmtime_component_stream_type_delete = dll.wasmtime_component_stream_type_delete _wasmtime_component_stream_type_delete.restype = None -_wasmtime_component_stream_type_delete.argtypes = [POINTER(wasmtime_component_stream_type_t)] +_wasmtime_component_stream_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_stream_type_t)] def wasmtime_component_stream_type_delete(ptr: Any) -> None: return _wasmtime_component_stream_type_delete(ptr) # type: ignore _wasmtime_component_stream_type_ty = dll.wasmtime_component_stream_type_ty -_wasmtime_component_stream_type_ty.restype = c_bool -_wasmtime_component_stream_type_ty.argtypes = [POINTER(wasmtime_component_stream_type_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_stream_type_ty.restype = ctypes.c_bool +_wasmtime_component_stream_type_ty.argtypes = [ctypes.POINTER(wasmtime_component_stream_type_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_stream_type_ty(ty: Any, type_ret: Any) -> bool: return _wasmtime_component_stream_type_ty(ty, type_ret) # type: ignore -wasmtime_component_valtype_kind_t = c_uint8 +wasmtime_component_valtype_kind_t = ctypes.c_uint8 -class wasmtime_component_valtype_union(Union): +class wasmtime_component_valtype_union(ctypes.Union): _fields_ = [ - ("list", POINTER(wasmtime_component_list_type_t)), - ("record", POINTER(wasmtime_component_record_type_t)), - ("tuple", POINTER(wasmtime_component_tuple_type_t)), - ("variant", POINTER(wasmtime_component_variant_type_t)), - ("enum_", POINTER(wasmtime_component_enum_type_t)), - ("option", POINTER(wasmtime_component_option_type_t)), - ("result", POINTER(wasmtime_component_result_type_t)), - ("flags", POINTER(wasmtime_component_flags_type_t)), - ("own", POINTER(wasmtime_component_resource_type_t)), - ("borrow", POINTER(wasmtime_component_resource_type_t)), - ("future", POINTER(wasmtime_component_future_type_t)), - ("stream", POINTER(wasmtime_component_stream_type_t)), + ("list", ctypes.POINTER(wasmtime_component_list_type_t)), + ("record", ctypes.POINTER(wasmtime_component_record_type_t)), + ("tuple", ctypes.POINTER(wasmtime_component_tuple_type_t)), + ("variant", ctypes.POINTER(wasmtime_component_variant_type_t)), + ("enum_", ctypes.POINTER(wasmtime_component_enum_type_t)), + ("option", ctypes.POINTER(wasmtime_component_option_type_t)), + ("result", ctypes.POINTER(wasmtime_component_result_type_t)), + ("flags", ctypes.POINTER(wasmtime_component_flags_type_t)), + ("own", ctypes.POINTER(wasmtime_component_resource_type_t)), + ("borrow", ctypes.POINTER(wasmtime_component_resource_type_t)), + ("future", ctypes.POINTER(wasmtime_component_future_type_t)), + ("stream", ctypes.POINTER(wasmtime_component_stream_type_t)), ] list: ctypes._Pointer record: ctypes._Pointer @@ -3936,195 +3935,195 @@ class wasmtime_component_valtype_union(Union): _wasmtime_component_valtype_clone = dll.wasmtime_component_valtype_clone _wasmtime_component_valtype_clone.restype = None -_wasmtime_component_valtype_clone.argtypes = [POINTER(wasmtime_component_valtype_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_valtype_clone.argtypes = [ctypes.POINTER(wasmtime_component_valtype_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_valtype_clone(ty: Any, out: Any) -> None: return _wasmtime_component_valtype_clone(ty, out) # type: ignore _wasmtime_component_valtype_equal = dll.wasmtime_component_valtype_equal -_wasmtime_component_valtype_equal.restype = c_bool -_wasmtime_component_valtype_equal.argtypes = [POINTER(wasmtime_component_valtype_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_valtype_equal.restype = ctypes.c_bool +_wasmtime_component_valtype_equal.argtypes = [ctypes.POINTER(wasmtime_component_valtype_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_valtype_equal(a: Any, b: Any) -> bool: return _wasmtime_component_valtype_equal(a, b) # type: ignore _wasmtime_component_valtype_delete = dll.wasmtime_component_valtype_delete _wasmtime_component_valtype_delete.restype = None -_wasmtime_component_valtype_delete.argtypes = [POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_valtype_delete.argtypes = [ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_valtype_delete(ptr: Any) -> None: return _wasmtime_component_valtype_delete(ptr) # type: ignore -class wasmtime_component_func_type_t(Structure): +class wasmtime_component_func_type_t(ctypes.Structure): pass _wasmtime_component_func_type_clone = dll.wasmtime_component_func_type_clone -_wasmtime_component_func_type_clone.restype = POINTER(wasmtime_component_func_type_t) -_wasmtime_component_func_type_clone.argtypes = [POINTER(wasmtime_component_func_type_t)] +_wasmtime_component_func_type_clone.restype = ctypes.POINTER(wasmtime_component_func_type_t) +_wasmtime_component_func_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_func_type_t)] def wasmtime_component_func_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_func_type_clone(ty) # type: ignore _wasmtime_component_func_type_delete = dll.wasmtime_component_func_type_delete _wasmtime_component_func_type_delete.restype = None -_wasmtime_component_func_type_delete.argtypes = [POINTER(wasmtime_component_func_type_t)] +_wasmtime_component_func_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_func_type_t)] def wasmtime_component_func_type_delete(ty: Any) -> None: return _wasmtime_component_func_type_delete(ty) # type: ignore _wasmtime_component_func_type_param_count = dll.wasmtime_component_func_type_param_count -_wasmtime_component_func_type_param_count.restype = c_size_t -_wasmtime_component_func_type_param_count.argtypes = [POINTER(wasmtime_component_func_type_t)] +_wasmtime_component_func_type_param_count.restype = ctypes.c_size_t +_wasmtime_component_func_type_param_count.argtypes = [ctypes.POINTER(wasmtime_component_func_type_t)] def wasmtime_component_func_type_param_count(ty: Any) -> int: return _wasmtime_component_func_type_param_count(ty) # type: ignore _wasmtime_component_func_type_param_nth = dll.wasmtime_component_func_type_param_nth -_wasmtime_component_func_type_param_nth.restype = c_bool -_wasmtime_component_func_type_param_nth.argtypes = [POINTER(wasmtime_component_func_type_t), c_size_t, POINTER(POINTER(c_char)), POINTER(c_size_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_func_type_param_nth.restype = ctypes.c_bool +_wasmtime_component_func_type_param_nth.argtypes = [ctypes.POINTER(wasmtime_component_func_type_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_func_type_param_nth(ty: Any, nth: Any, name_ret: Any, name_len_ret: Any, type_ret: Any) -> bool: return _wasmtime_component_func_type_param_nth(ty, nth, name_ret, name_len_ret, type_ret) # type: ignore _wasmtime_component_func_type_result = dll.wasmtime_component_func_type_result -_wasmtime_component_func_type_result.restype = c_bool -_wasmtime_component_func_type_result.argtypes = [POINTER(wasmtime_component_func_type_t), POINTER(wasmtime_component_valtype_t)] +_wasmtime_component_func_type_result.restype = ctypes.c_bool +_wasmtime_component_func_type_result.argtypes = [ctypes.POINTER(wasmtime_component_func_type_t), ctypes.POINTER(wasmtime_component_valtype_t)] def wasmtime_component_func_type_result(ty: Any, type_ret: Any) -> bool: return _wasmtime_component_func_type_result(ty, type_ret) # type: ignore -class wasmtime_component_item_t(Structure): +class wasmtime_component_item_t(ctypes.Structure): pass -class wasmtime_component_instance_type(Structure): +class wasmtime_component_instance_type(ctypes.Structure): pass wasmtime_component_instance_type_t = wasmtime_component_instance_type _wasmtime_component_instance_type_clone = dll.wasmtime_component_instance_type_clone -_wasmtime_component_instance_type_clone.restype = POINTER(wasmtime_component_instance_type_t) -_wasmtime_component_instance_type_clone.argtypes = [POINTER(wasmtime_component_instance_type_t)] +_wasmtime_component_instance_type_clone.restype = ctypes.POINTER(wasmtime_component_instance_type_t) +_wasmtime_component_instance_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_instance_type_t)] def wasmtime_component_instance_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_instance_type_clone(ty) # type: ignore _wasmtime_component_instance_type_delete = dll.wasmtime_component_instance_type_delete _wasmtime_component_instance_type_delete.restype = None -_wasmtime_component_instance_type_delete.argtypes = [POINTER(wasmtime_component_instance_type_t)] +_wasmtime_component_instance_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_instance_type_t)] def wasmtime_component_instance_type_delete(ty: Any) -> None: return _wasmtime_component_instance_type_delete(ty) # type: ignore _wasmtime_component_instance_type_export_count = dll.wasmtime_component_instance_type_export_count -_wasmtime_component_instance_type_export_count.restype = c_size_t -_wasmtime_component_instance_type_export_count.argtypes = [POINTER(wasmtime_component_instance_type_t), POINTER(wasm_engine_t)] +_wasmtime_component_instance_type_export_count.restype = ctypes.c_size_t +_wasmtime_component_instance_type_export_count.argtypes = [ctypes.POINTER(wasmtime_component_instance_type_t), ctypes.POINTER(wasm_engine_t)] def wasmtime_component_instance_type_export_count(ty: Any, engine: Any) -> int: return _wasmtime_component_instance_type_export_count(ty, engine) # type: ignore _wasmtime_component_instance_type_export_get = dll.wasmtime_component_instance_type_export_get -_wasmtime_component_instance_type_export_get.restype = c_bool -_wasmtime_component_instance_type_export_get.argtypes = [POINTER(wasmtime_component_instance_type_t), POINTER(wasm_engine_t), POINTER(c_char), c_size_t, POINTER(wasmtime_component_item_t)] +_wasmtime_component_instance_type_export_get.restype = ctypes.c_bool +_wasmtime_component_instance_type_export_get.argtypes = [ctypes.POINTER(wasmtime_component_instance_type_t), ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_item_t)] def wasmtime_component_instance_type_export_get(ty: Any, engine: Any, name: Any, name_len: Any, ret: Any) -> bool: return _wasmtime_component_instance_type_export_get(ty, engine, name, name_len, ret) # type: ignore _wasmtime_component_instance_type_export_nth = dll.wasmtime_component_instance_type_export_nth -_wasmtime_component_instance_type_export_nth.restype = c_bool -_wasmtime_component_instance_type_export_nth.argtypes = [POINTER(wasmtime_component_instance_type_t), POINTER(wasm_engine_t), c_size_t, POINTER(POINTER(c_char)), POINTER(c_size_t), POINTER(wasmtime_component_item_t)] +_wasmtime_component_instance_type_export_nth.restype = ctypes.c_bool +_wasmtime_component_instance_type_export_nth.argtypes = [ctypes.POINTER(wasmtime_component_instance_type_t), ctypes.POINTER(wasm_engine_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(wasmtime_component_item_t)] def wasmtime_component_instance_type_export_nth(ty: Any, engine: Any, nth: Any, name_ret: Any, name_len_ret: Any, type_ret: Any) -> bool: return _wasmtime_component_instance_type_export_nth(ty, engine, nth, name_ret, name_len_ret, type_ret) # type: ignore -class wasmtime_module_type(Structure): +class wasmtime_module_type(ctypes.Structure): pass wasmtime_module_type_t = wasmtime_module_type _wasmtime_module_type_clone = dll.wasmtime_module_type_clone -_wasmtime_module_type_clone.restype = POINTER(wasmtime_module_type_t) -_wasmtime_module_type_clone.argtypes = [POINTER(wasmtime_module_type_t)] +_wasmtime_module_type_clone.restype = ctypes.POINTER(wasmtime_module_type_t) +_wasmtime_module_type_clone.argtypes = [ctypes.POINTER(wasmtime_module_type_t)] def wasmtime_module_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_module_type_clone(ty) # type: ignore _wasmtime_module_type_delete = dll.wasmtime_module_type_delete _wasmtime_module_type_delete.restype = None -_wasmtime_module_type_delete.argtypes = [POINTER(wasmtime_module_type_t)] +_wasmtime_module_type_delete.argtypes = [ctypes.POINTER(wasmtime_module_type_t)] def wasmtime_module_type_delete(ty: Any) -> None: return _wasmtime_module_type_delete(ty) # type: ignore _wasmtime_module_type_import_count = dll.wasmtime_module_type_import_count -_wasmtime_module_type_import_count.restype = c_size_t -_wasmtime_module_type_import_count.argtypes = [POINTER(wasmtime_module_type_t), POINTER(wasm_engine_t)] +_wasmtime_module_type_import_count.restype = ctypes.c_size_t +_wasmtime_module_type_import_count.argtypes = [ctypes.POINTER(wasmtime_module_type_t), ctypes.POINTER(wasm_engine_t)] def wasmtime_module_type_import_count(ty: Any, engine: Any) -> int: return _wasmtime_module_type_import_count(ty, engine) # type: ignore _wasmtime_module_type_import_nth = dll.wasmtime_module_type_import_nth -_wasmtime_module_type_import_nth.restype = POINTER(wasm_importtype_t) -_wasmtime_module_type_import_nth.argtypes = [POINTER(wasmtime_module_type_t), POINTER(wasm_engine_t), c_size_t] +_wasmtime_module_type_import_nth.restype = ctypes.POINTER(wasm_importtype_t) +_wasmtime_module_type_import_nth.argtypes = [ctypes.POINTER(wasmtime_module_type_t), ctypes.POINTER(wasm_engine_t), ctypes.c_size_t] def wasmtime_module_type_import_nth(ty: Any, engine: Any, nth: Any) -> ctypes._Pointer: return _wasmtime_module_type_import_nth(ty, engine, nth) # type: ignore _wasmtime_module_type_export_count = dll.wasmtime_module_type_export_count -_wasmtime_module_type_export_count.restype = c_size_t -_wasmtime_module_type_export_count.argtypes = [POINTER(wasmtime_module_type_t), POINTER(wasm_engine_t)] +_wasmtime_module_type_export_count.restype = ctypes.c_size_t +_wasmtime_module_type_export_count.argtypes = [ctypes.POINTER(wasmtime_module_type_t), ctypes.POINTER(wasm_engine_t)] def wasmtime_module_type_export_count(ty: Any, engine: Any) -> int: return _wasmtime_module_type_export_count(ty, engine) # type: ignore _wasmtime_module_type_export_nth = dll.wasmtime_module_type_export_nth -_wasmtime_module_type_export_nth.restype = POINTER(wasm_exporttype_t) -_wasmtime_module_type_export_nth.argtypes = [POINTER(wasmtime_module_type_t), POINTER(wasm_engine_t), c_size_t] +_wasmtime_module_type_export_nth.restype = ctypes.POINTER(wasm_exporttype_t) +_wasmtime_module_type_export_nth.argtypes = [ctypes.POINTER(wasmtime_module_type_t), ctypes.POINTER(wasm_engine_t), ctypes.c_size_t] def wasmtime_module_type_export_nth(ty: Any, engine: Any, nth: Any) -> ctypes._Pointer: return _wasmtime_module_type_export_nth(ty, engine, nth) # type: ignore -class wasmtime_component_type_t(Structure): +class wasmtime_component_type_t(ctypes.Structure): pass _wasmtime_component_type_clone = dll.wasmtime_component_type_clone -_wasmtime_component_type_clone.restype = POINTER(wasmtime_component_type_t) -_wasmtime_component_type_clone.argtypes = [POINTER(wasmtime_component_type_t)] +_wasmtime_component_type_clone.restype = ctypes.POINTER(wasmtime_component_type_t) +_wasmtime_component_type_clone.argtypes = [ctypes.POINTER(wasmtime_component_type_t)] def wasmtime_component_type_clone(ty: Any) -> ctypes._Pointer: return _wasmtime_component_type_clone(ty) # type: ignore _wasmtime_component_type_delete = dll.wasmtime_component_type_delete _wasmtime_component_type_delete.restype = None -_wasmtime_component_type_delete.argtypes = [POINTER(wasmtime_component_type_t)] +_wasmtime_component_type_delete.argtypes = [ctypes.POINTER(wasmtime_component_type_t)] def wasmtime_component_type_delete(ty: Any) -> None: return _wasmtime_component_type_delete(ty) # type: ignore _wasmtime_component_type_import_count = dll.wasmtime_component_type_import_count -_wasmtime_component_type_import_count.restype = c_size_t -_wasmtime_component_type_import_count.argtypes = [POINTER(wasmtime_component_type_t), POINTER(wasm_engine_t)] +_wasmtime_component_type_import_count.restype = ctypes.c_size_t +_wasmtime_component_type_import_count.argtypes = [ctypes.POINTER(wasmtime_component_type_t), ctypes.POINTER(wasm_engine_t)] def wasmtime_component_type_import_count(ty: Any, engine: Any) -> int: return _wasmtime_component_type_import_count(ty, engine) # type: ignore _wasmtime_component_type_import_get = dll.wasmtime_component_type_import_get -_wasmtime_component_type_import_get.restype = c_bool -_wasmtime_component_type_import_get.argtypes = [POINTER(wasmtime_component_type_t), POINTER(wasm_engine_t), POINTER(c_char), c_size_t, POINTER(wasmtime_component_item_t)] +_wasmtime_component_type_import_get.restype = ctypes.c_bool +_wasmtime_component_type_import_get.argtypes = [ctypes.POINTER(wasmtime_component_type_t), ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_item_t)] def wasmtime_component_type_import_get(ty: Any, engine: Any, name: Any, name_len: Any, ret: Any) -> bool: return _wasmtime_component_type_import_get(ty, engine, name, name_len, ret) # type: ignore _wasmtime_component_type_import_nth = dll.wasmtime_component_type_import_nth -_wasmtime_component_type_import_nth.restype = c_bool -_wasmtime_component_type_import_nth.argtypes = [POINTER(wasmtime_component_type_t), POINTER(wasm_engine_t), c_size_t, POINTER(POINTER(c_char)), POINTER(c_size_t), POINTER(wasmtime_component_item_t)] +_wasmtime_component_type_import_nth.restype = ctypes.c_bool +_wasmtime_component_type_import_nth.argtypes = [ctypes.POINTER(wasmtime_component_type_t), ctypes.POINTER(wasm_engine_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(wasmtime_component_item_t)] def wasmtime_component_type_import_nth(ty: Any, engine: Any, nth: Any, name_ret: Any, name_len_ret: Any, type_ret: Any) -> bool: return _wasmtime_component_type_import_nth(ty, engine, nth, name_ret, name_len_ret, type_ret) # type: ignore _wasmtime_component_type_export_count = dll.wasmtime_component_type_export_count -_wasmtime_component_type_export_count.restype = c_size_t -_wasmtime_component_type_export_count.argtypes = [POINTER(wasmtime_component_type_t), POINTER(wasm_engine_t)] +_wasmtime_component_type_export_count.restype = ctypes.c_size_t +_wasmtime_component_type_export_count.argtypes = [ctypes.POINTER(wasmtime_component_type_t), ctypes.POINTER(wasm_engine_t)] def wasmtime_component_type_export_count(ty: Any, engine: Any) -> int: return _wasmtime_component_type_export_count(ty, engine) # type: ignore _wasmtime_component_type_export_get = dll.wasmtime_component_type_export_get -_wasmtime_component_type_export_get.restype = c_bool -_wasmtime_component_type_export_get.argtypes = [POINTER(wasmtime_component_type_t), POINTER(wasm_engine_t), POINTER(c_char), c_size_t, POINTER(wasmtime_component_item_t)] +_wasmtime_component_type_export_get.restype = ctypes.c_bool +_wasmtime_component_type_export_get.argtypes = [ctypes.POINTER(wasmtime_component_type_t), ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_item_t)] def wasmtime_component_type_export_get(ty: Any, engine: Any, name: Any, name_len: Any, ret: Any) -> bool: return _wasmtime_component_type_export_get(ty, engine, name, name_len, ret) # type: ignore _wasmtime_component_type_export_nth = dll.wasmtime_component_type_export_nth -_wasmtime_component_type_export_nth.restype = c_bool -_wasmtime_component_type_export_nth.argtypes = [POINTER(wasmtime_component_type_t), POINTER(wasm_engine_t), c_size_t, POINTER(POINTER(c_char)), POINTER(c_size_t), POINTER(wasmtime_component_item_t)] +_wasmtime_component_type_export_nth.restype = ctypes.c_bool +_wasmtime_component_type_export_nth.argtypes = [ctypes.POINTER(wasmtime_component_type_t), ctypes.POINTER(wasm_engine_t), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(wasmtime_component_item_t)] def wasmtime_component_type_export_nth(ty: Any, engine: Any, nth: Any, name_ret: Any, name_len_ret: Any, type_ret: Any) -> bool: return _wasmtime_component_type_export_nth(ty, engine, nth, name_ret, name_len_ret, type_ret) # type: ignore -wasmtime_component_item_kind_t = c_uint8 +wasmtime_component_item_kind_t = ctypes.c_uint8 -class wasmtime_component_item_union(Union): +class wasmtime_component_item_union(ctypes.Union): _fields_ = [ - ("component", POINTER(wasmtime_component_type_t)), - ("component_instance", POINTER(wasmtime_component_instance_type_t)), - ("module", POINTER(wasmtime_module_type_t)), - ("component_func", POINTER(wasmtime_component_func_type_t)), - ("resource", POINTER(wasmtime_component_resource_type_t)), - ("core_func", POINTER(wasm_functype_t)), + ("component", ctypes.POINTER(wasmtime_component_type_t)), + ("component_instance", ctypes.POINTER(wasmtime_component_instance_type_t)), + ("module", ctypes.POINTER(wasmtime_module_type_t)), + ("component_func", ctypes.POINTER(wasmtime_component_func_type_t)), + ("resource", ctypes.POINTER(wasmtime_component_resource_type_t)), + ("core_func", ctypes.POINTER(wasm_functype_t)), ("type", wasmtime_component_valtype_t), ] component: ctypes._Pointer @@ -4144,182 +4143,182 @@ class wasmtime_component_item_union(Union): _wasmtime_component_item_clone = dll.wasmtime_component_item_clone _wasmtime_component_item_clone.restype = None -_wasmtime_component_item_clone.argtypes = [POINTER(wasmtime_component_item_t), POINTER(wasmtime_component_item_t)] +_wasmtime_component_item_clone.argtypes = [ctypes.POINTER(wasmtime_component_item_t), ctypes.POINTER(wasmtime_component_item_t)] def wasmtime_component_item_clone(item: Any, out: Any) -> None: return _wasmtime_component_item_clone(item, out) # type: ignore _wasmtime_component_item_delete = dll.wasmtime_component_item_delete _wasmtime_component_item_delete.restype = None -_wasmtime_component_item_delete.argtypes = [POINTER(wasmtime_component_item_t)] +_wasmtime_component_item_delete.argtypes = [ctypes.POINTER(wasmtime_component_item_t)] def wasmtime_component_item_delete(ptr: Any) -> None: return _wasmtime_component_item_delete(ptr) # type: ignore -class wasmtime_component_t(Structure): +class wasmtime_component_t(ctypes.Structure): pass _wasmtime_component_new = dll.wasmtime_component_new -_wasmtime_component_new.restype = POINTER(wasmtime_error_t) -_wasmtime_component_new.argtypes = [POINTER(wasm_engine_t), POINTER(c_uint8), c_size_t, POINTER(POINTER(wasmtime_component_t))] +_wasmtime_component_new.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_new.argtypes = [ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_uint8), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasmtime_component_t))] def wasmtime_component_new(engine: Any, buf: Any, len: Any, component_out: Any) -> ctypes._Pointer: return _wasmtime_component_new(engine, buf, len, component_out) # type: ignore _wasmtime_component_serialize = dll.wasmtime_component_serialize -_wasmtime_component_serialize.restype = POINTER(wasmtime_error_t) -_wasmtime_component_serialize.argtypes = [POINTER(wasmtime_component_t), POINTER(wasm_byte_vec_t)] +_wasmtime_component_serialize.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_serialize.argtypes = [ctypes.POINTER(wasmtime_component_t), ctypes.POINTER(wasm_byte_vec_t)] def wasmtime_component_serialize(component: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_component_serialize(component, ret) # type: ignore _wasmtime_component_deserialize = dll.wasmtime_component_deserialize -_wasmtime_component_deserialize.restype = POINTER(wasmtime_error_t) -_wasmtime_component_deserialize.argtypes = [POINTER(wasm_engine_t), POINTER(c_uint8), c_size_t, POINTER(POINTER(wasmtime_component_t))] +_wasmtime_component_deserialize.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_deserialize.argtypes = [ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_uint8), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasmtime_component_t))] def wasmtime_component_deserialize(engine: Any, buf: Any, len: Any, component_out: Any) -> ctypes._Pointer: return _wasmtime_component_deserialize(engine, buf, len, component_out) # type: ignore _wasmtime_component_deserialize_file = dll.wasmtime_component_deserialize_file -_wasmtime_component_deserialize_file.restype = POINTER(wasmtime_error_t) -_wasmtime_component_deserialize_file.argtypes = [POINTER(wasm_engine_t), POINTER(c_char), POINTER(POINTER(wasmtime_component_t))] +_wasmtime_component_deserialize_file.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_deserialize_file.argtypes = [ctypes.POINTER(wasm_engine_t), ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.POINTER(wasmtime_component_t))] def wasmtime_component_deserialize_file(engine: Any, path: Any, component_out: Any) -> ctypes._Pointer: return _wasmtime_component_deserialize_file(engine, path, component_out) # type: ignore _wasmtime_component_clone = dll.wasmtime_component_clone -_wasmtime_component_clone.restype = POINTER(wasmtime_component_t) -_wasmtime_component_clone.argtypes = [POINTER(wasmtime_component_t)] +_wasmtime_component_clone.restype = ctypes.POINTER(wasmtime_component_t) +_wasmtime_component_clone.argtypes = [ctypes.POINTER(wasmtime_component_t)] def wasmtime_component_clone(component: Any) -> ctypes._Pointer: return _wasmtime_component_clone(component) # type: ignore _wasmtime_component_type = dll.wasmtime_component_type -_wasmtime_component_type.restype = POINTER(wasmtime_component_type_t) -_wasmtime_component_type.argtypes = [POINTER(wasmtime_component_t)] +_wasmtime_component_type.restype = ctypes.POINTER(wasmtime_component_type_t) +_wasmtime_component_type.argtypes = [ctypes.POINTER(wasmtime_component_t)] def wasmtime_component_type(component: Any) -> ctypes._Pointer: return _wasmtime_component_type(component) # type: ignore _wasmtime_component_delete = dll.wasmtime_component_delete _wasmtime_component_delete.restype = None -_wasmtime_component_delete.argtypes = [POINTER(wasmtime_component_t)] +_wasmtime_component_delete.argtypes = [ctypes.POINTER(wasmtime_component_t)] def wasmtime_component_delete(component: Any) -> None: return _wasmtime_component_delete(component) # type: ignore -class wasmtime_component_export_index_t(Structure): +class wasmtime_component_export_index_t(ctypes.Structure): pass _wasmtime_component_get_export_index = dll.wasmtime_component_get_export_index -_wasmtime_component_get_export_index.restype = POINTER(wasmtime_component_export_index_t) -_wasmtime_component_get_export_index.argtypes = [POINTER(wasmtime_component_t), POINTER(wasmtime_component_export_index_t), POINTER(c_char), c_size_t] +_wasmtime_component_get_export_index.restype = ctypes.POINTER(wasmtime_component_export_index_t) +_wasmtime_component_get_export_index.argtypes = [ctypes.POINTER(wasmtime_component_t), ctypes.POINTER(wasmtime_component_export_index_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t] def wasmtime_component_get_export_index(component: Any, instance_export_index: Any, name: Any, name_len: Any) -> ctypes._Pointer: return _wasmtime_component_get_export_index(component, instance_export_index, name, name_len) # type: ignore _wasmtime_component_export_index_clone = dll.wasmtime_component_export_index_clone -_wasmtime_component_export_index_clone.restype = POINTER(wasmtime_component_export_index_t) -_wasmtime_component_export_index_clone.argtypes = [POINTER(wasmtime_component_export_index_t)] +_wasmtime_component_export_index_clone.restype = ctypes.POINTER(wasmtime_component_export_index_t) +_wasmtime_component_export_index_clone.argtypes = [ctypes.POINTER(wasmtime_component_export_index_t)] def wasmtime_component_export_index_clone(index: Any) -> ctypes._Pointer: return _wasmtime_component_export_index_clone(index) # type: ignore _wasmtime_component_export_index_delete = dll.wasmtime_component_export_index_delete _wasmtime_component_export_index_delete.restype = None -_wasmtime_component_export_index_delete.argtypes = [POINTER(wasmtime_component_export_index_t)] +_wasmtime_component_export_index_delete.argtypes = [ctypes.POINTER(wasmtime_component_export_index_t)] def wasmtime_component_export_index_delete(export_index: Any) -> None: return _wasmtime_component_export_index_delete(export_index) # type: ignore -class wasmtime_component_resource_any(Structure): +class wasmtime_component_resource_any(ctypes.Structure): pass wasmtime_component_resource_any_t = wasmtime_component_resource_any _wasmtime_component_resource_any_type = dll.wasmtime_component_resource_any_type -_wasmtime_component_resource_any_type.restype = POINTER(wasmtime_component_resource_type_t) -_wasmtime_component_resource_any_type.argtypes = [POINTER(wasmtime_component_resource_any_t)] +_wasmtime_component_resource_any_type.restype = ctypes.POINTER(wasmtime_component_resource_type_t) +_wasmtime_component_resource_any_type.argtypes = [ctypes.POINTER(wasmtime_component_resource_any_t)] def wasmtime_component_resource_any_type(resource: Any) -> ctypes._Pointer: return _wasmtime_component_resource_any_type(resource) # type: ignore _wasmtime_component_resource_any_clone = dll.wasmtime_component_resource_any_clone -_wasmtime_component_resource_any_clone.restype = POINTER(wasmtime_component_resource_any_t) -_wasmtime_component_resource_any_clone.argtypes = [POINTER(wasmtime_component_resource_any_t)] +_wasmtime_component_resource_any_clone.restype = ctypes.POINTER(wasmtime_component_resource_any_t) +_wasmtime_component_resource_any_clone.argtypes = [ctypes.POINTER(wasmtime_component_resource_any_t)] def wasmtime_component_resource_any_clone(resource: Any) -> ctypes._Pointer: return _wasmtime_component_resource_any_clone(resource) # type: ignore _wasmtime_component_resource_any_owned = dll.wasmtime_component_resource_any_owned -_wasmtime_component_resource_any_owned.restype = c_bool -_wasmtime_component_resource_any_owned.argtypes = [POINTER(wasmtime_component_resource_any_t)] +_wasmtime_component_resource_any_owned.restype = ctypes.c_bool +_wasmtime_component_resource_any_owned.argtypes = [ctypes.POINTER(wasmtime_component_resource_any_t)] def wasmtime_component_resource_any_owned(resource: Any) -> bool: return _wasmtime_component_resource_any_owned(resource) # type: ignore _wasmtime_component_resource_any_drop = dll.wasmtime_component_resource_any_drop -_wasmtime_component_resource_any_drop.restype = POINTER(wasmtime_error_t) -_wasmtime_component_resource_any_drop.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_component_resource_any_t)] +_wasmtime_component_resource_any_drop.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_resource_any_drop.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_component_resource_any_t)] def wasmtime_component_resource_any_drop(ctx: Any, resource: Any) -> ctypes._Pointer: return _wasmtime_component_resource_any_drop(ctx, resource) # type: ignore _wasmtime_component_resource_any_delete = dll.wasmtime_component_resource_any_delete _wasmtime_component_resource_any_delete.restype = None -_wasmtime_component_resource_any_delete.argtypes = [POINTER(wasmtime_component_resource_any_t)] +_wasmtime_component_resource_any_delete.argtypes = [ctypes.POINTER(wasmtime_component_resource_any_t)] def wasmtime_component_resource_any_delete(resource: Any) -> None: return _wasmtime_component_resource_any_delete(resource) # type: ignore -class wasmtime_component_resource_host(Structure): +class wasmtime_component_resource_host(ctypes.Structure): pass wasmtime_component_resource_host_t = wasmtime_component_resource_host _wasmtime_component_resource_host_new = dll.wasmtime_component_resource_host_new -_wasmtime_component_resource_host_new.restype = POINTER(wasmtime_component_resource_host_t) -_wasmtime_component_resource_host_new.argtypes = [c_bool, c_uint32, c_uint32] +_wasmtime_component_resource_host_new.restype = ctypes.POINTER(wasmtime_component_resource_host_t) +_wasmtime_component_resource_host_new.argtypes = [ctypes.c_bool, ctypes.c_uint32, ctypes.c_uint32] def wasmtime_component_resource_host_new(owned: Any, rep: Any, ty: Any) -> ctypes._Pointer: return _wasmtime_component_resource_host_new(owned, rep, ty) # type: ignore _wasmtime_component_resource_host_clone = dll.wasmtime_component_resource_host_clone -_wasmtime_component_resource_host_clone.restype = POINTER(wasmtime_component_resource_host_t) -_wasmtime_component_resource_host_clone.argtypes = [POINTER(wasmtime_component_resource_host_t)] +_wasmtime_component_resource_host_clone.restype = ctypes.POINTER(wasmtime_component_resource_host_t) +_wasmtime_component_resource_host_clone.argtypes = [ctypes.POINTER(wasmtime_component_resource_host_t)] def wasmtime_component_resource_host_clone(resource: Any) -> ctypes._Pointer: return _wasmtime_component_resource_host_clone(resource) # type: ignore _wasmtime_component_resource_host_rep = dll.wasmtime_component_resource_host_rep -_wasmtime_component_resource_host_rep.restype = c_uint32 -_wasmtime_component_resource_host_rep.argtypes = [POINTER(wasmtime_component_resource_host_t)] +_wasmtime_component_resource_host_rep.restype = ctypes.c_uint32 +_wasmtime_component_resource_host_rep.argtypes = [ctypes.POINTER(wasmtime_component_resource_host_t)] def wasmtime_component_resource_host_rep(resource: Any) -> int: return _wasmtime_component_resource_host_rep(resource) # type: ignore _wasmtime_component_resource_host_type = dll.wasmtime_component_resource_host_type -_wasmtime_component_resource_host_type.restype = c_uint32 -_wasmtime_component_resource_host_type.argtypes = [POINTER(wasmtime_component_resource_host_t)] +_wasmtime_component_resource_host_type.restype = ctypes.c_uint32 +_wasmtime_component_resource_host_type.argtypes = [ctypes.POINTER(wasmtime_component_resource_host_t)] def wasmtime_component_resource_host_type(resource: Any) -> int: return _wasmtime_component_resource_host_type(resource) # type: ignore _wasmtime_component_resource_host_owned = dll.wasmtime_component_resource_host_owned -_wasmtime_component_resource_host_owned.restype = c_bool -_wasmtime_component_resource_host_owned.argtypes = [POINTER(wasmtime_component_resource_host_t)] +_wasmtime_component_resource_host_owned.restype = ctypes.c_bool +_wasmtime_component_resource_host_owned.argtypes = [ctypes.POINTER(wasmtime_component_resource_host_t)] def wasmtime_component_resource_host_owned(resource: Any) -> bool: return _wasmtime_component_resource_host_owned(resource) # type: ignore _wasmtime_component_resource_host_delete = dll.wasmtime_component_resource_host_delete _wasmtime_component_resource_host_delete.restype = None -_wasmtime_component_resource_host_delete.argtypes = [POINTER(wasmtime_component_resource_host_t)] +_wasmtime_component_resource_host_delete.argtypes = [ctypes.POINTER(wasmtime_component_resource_host_t)] def wasmtime_component_resource_host_delete(resource: Any) -> None: return _wasmtime_component_resource_host_delete(resource) # type: ignore _wasmtime_component_resource_any_to_host = dll.wasmtime_component_resource_any_to_host -_wasmtime_component_resource_any_to_host.restype = POINTER(wasmtime_error_t) -_wasmtime_component_resource_any_to_host.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_component_resource_any_t), POINTER(POINTER(wasmtime_component_resource_host_t))] +_wasmtime_component_resource_any_to_host.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_resource_any_to_host.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_component_resource_any_t), ctypes.POINTER(ctypes.POINTER(wasmtime_component_resource_host_t))] def wasmtime_component_resource_any_to_host(ctx: Any, resource: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_component_resource_any_to_host(ctx, resource, ret) # type: ignore _wasmtime_component_resource_host_to_any = dll.wasmtime_component_resource_host_to_any -_wasmtime_component_resource_host_to_any.restype = POINTER(wasmtime_error_t) -_wasmtime_component_resource_host_to_any.argtypes = [POINTER(wasmtime_context_t), POINTER(wasmtime_component_resource_host_t), POINTER(POINTER(wasmtime_component_resource_any_t))] +_wasmtime_component_resource_host_to_any.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_resource_host_to_any.argtypes = [ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_component_resource_host_t), ctypes.POINTER(ctypes.POINTER(wasmtime_component_resource_any_t))] def wasmtime_component_resource_host_to_any(ctx: Any, resource: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_component_resource_host_to_any(ctx, resource, ret) # type: ignore -wasmtime_component_valkind_t = c_uint8 +wasmtime_component_valkind_t = ctypes.c_uint8 -class wasmtime_component_val(Structure): +class wasmtime_component_val(ctypes.Structure): pass -class wasmtime_component_valrecord_entry(Structure): +class wasmtime_component_valrecord_entry(ctypes.Structure): pass -class wasmtime_component_vallist(Structure): +class wasmtime_component_vallist(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(wasmtime_component_val)), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(wasmtime_component_val)), ] size: int data: ctypes._Pointer @@ -4328,38 +4327,38 @@ class wasmtime_component_vallist(Structure): _wasmtime_component_vallist_new = dll.wasmtime_component_vallist_new _wasmtime_component_vallist_new.restype = None -_wasmtime_component_vallist_new.argtypes = [POINTER(wasmtime_component_vallist_t), c_size_t, POINTER(wasmtime_component_val)] +_wasmtime_component_vallist_new.argtypes = [ctypes.POINTER(wasmtime_component_vallist_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_val)] def wasmtime_component_vallist_new(out: Any, size: Any, ptr: Any) -> None: return _wasmtime_component_vallist_new(out, size, ptr) # type: ignore _wasmtime_component_vallist_new_empty = dll.wasmtime_component_vallist_new_empty _wasmtime_component_vallist_new_empty.restype = None -_wasmtime_component_vallist_new_empty.argtypes = [POINTER(wasmtime_component_vallist_t)] +_wasmtime_component_vallist_new_empty.argtypes = [ctypes.POINTER(wasmtime_component_vallist_t)] def wasmtime_component_vallist_new_empty(out: Any) -> None: return _wasmtime_component_vallist_new_empty(out) # type: ignore _wasmtime_component_vallist_new_uninit = dll.wasmtime_component_vallist_new_uninit _wasmtime_component_vallist_new_uninit.restype = None -_wasmtime_component_vallist_new_uninit.argtypes = [POINTER(wasmtime_component_vallist_t), c_size_t] +_wasmtime_component_vallist_new_uninit.argtypes = [ctypes.POINTER(wasmtime_component_vallist_t), ctypes.c_size_t] def wasmtime_component_vallist_new_uninit(out: Any, size: Any) -> None: return _wasmtime_component_vallist_new_uninit(out, size) # type: ignore _wasmtime_component_vallist_copy = dll.wasmtime_component_vallist_copy _wasmtime_component_vallist_copy.restype = None -_wasmtime_component_vallist_copy.argtypes = [POINTER(wasmtime_component_vallist_t), POINTER(wasmtime_component_vallist_t)] +_wasmtime_component_vallist_copy.argtypes = [ctypes.POINTER(wasmtime_component_vallist_t), ctypes.POINTER(wasmtime_component_vallist_t)] def wasmtime_component_vallist_copy(dst: Any, src: Any) -> None: return _wasmtime_component_vallist_copy(dst, src) # type: ignore _wasmtime_component_vallist_delete = dll.wasmtime_component_vallist_delete _wasmtime_component_vallist_delete.restype = None -_wasmtime_component_vallist_delete.argtypes = [POINTER(wasmtime_component_vallist_t)] +_wasmtime_component_vallist_delete.argtypes = [ctypes.POINTER(wasmtime_component_vallist_t)] def wasmtime_component_vallist_delete(value: Any) -> None: return _wasmtime_component_vallist_delete(value) # type: ignore -class wasmtime_component_valrecord(Structure): +class wasmtime_component_valrecord(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(wasmtime_component_valrecord_entry)), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(wasmtime_component_valrecord_entry)), ] size: int data: ctypes._Pointer @@ -4368,38 +4367,38 @@ class wasmtime_component_valrecord(Structure): _wasmtime_component_valrecord_new = dll.wasmtime_component_valrecord_new _wasmtime_component_valrecord_new.restype = None -_wasmtime_component_valrecord_new.argtypes = [POINTER(wasmtime_component_valrecord_t), c_size_t, POINTER(wasmtime_component_valrecord_entry)] +_wasmtime_component_valrecord_new.argtypes = [ctypes.POINTER(wasmtime_component_valrecord_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_valrecord_entry)] def wasmtime_component_valrecord_new(out: Any, size: Any, ptr: Any) -> None: return _wasmtime_component_valrecord_new(out, size, ptr) # type: ignore _wasmtime_component_valrecord_new_empty = dll.wasmtime_component_valrecord_new_empty _wasmtime_component_valrecord_new_empty.restype = None -_wasmtime_component_valrecord_new_empty.argtypes = [POINTER(wasmtime_component_valrecord_t)] +_wasmtime_component_valrecord_new_empty.argtypes = [ctypes.POINTER(wasmtime_component_valrecord_t)] def wasmtime_component_valrecord_new_empty(out: Any) -> None: return _wasmtime_component_valrecord_new_empty(out) # type: ignore _wasmtime_component_valrecord_new_uninit = dll.wasmtime_component_valrecord_new_uninit _wasmtime_component_valrecord_new_uninit.restype = None -_wasmtime_component_valrecord_new_uninit.argtypes = [POINTER(wasmtime_component_valrecord_t), c_size_t] +_wasmtime_component_valrecord_new_uninit.argtypes = [ctypes.POINTER(wasmtime_component_valrecord_t), ctypes.c_size_t] def wasmtime_component_valrecord_new_uninit(out: Any, size: Any) -> None: return _wasmtime_component_valrecord_new_uninit(out, size) # type: ignore _wasmtime_component_valrecord_copy = dll.wasmtime_component_valrecord_copy _wasmtime_component_valrecord_copy.restype = None -_wasmtime_component_valrecord_copy.argtypes = [POINTER(wasmtime_component_valrecord_t), POINTER(wasmtime_component_valrecord_t)] +_wasmtime_component_valrecord_copy.argtypes = [ctypes.POINTER(wasmtime_component_valrecord_t), ctypes.POINTER(wasmtime_component_valrecord_t)] def wasmtime_component_valrecord_copy(dst: Any, src: Any) -> None: return _wasmtime_component_valrecord_copy(dst, src) # type: ignore _wasmtime_component_valrecord_delete = dll.wasmtime_component_valrecord_delete _wasmtime_component_valrecord_delete.restype = None -_wasmtime_component_valrecord_delete.argtypes = [POINTER(wasmtime_component_valrecord_t)] +_wasmtime_component_valrecord_delete.argtypes = [ctypes.POINTER(wasmtime_component_valrecord_t)] def wasmtime_component_valrecord_delete(value: Any) -> None: return _wasmtime_component_valrecord_delete(value) # type: ignore -class wasmtime_component_valtuple(Structure): +class wasmtime_component_valtuple(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(wasmtime_component_val)), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(wasmtime_component_val)), ] size: int data: ctypes._Pointer @@ -4408,38 +4407,38 @@ class wasmtime_component_valtuple(Structure): _wasmtime_component_valtuple_new = dll.wasmtime_component_valtuple_new _wasmtime_component_valtuple_new.restype = None -_wasmtime_component_valtuple_new.argtypes = [POINTER(wasmtime_component_valtuple_t), c_size_t, POINTER(wasmtime_component_val)] +_wasmtime_component_valtuple_new.argtypes = [ctypes.POINTER(wasmtime_component_valtuple_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_val)] def wasmtime_component_valtuple_new(out: Any, size: Any, ptr: Any) -> None: return _wasmtime_component_valtuple_new(out, size, ptr) # type: ignore _wasmtime_component_valtuple_new_empty = dll.wasmtime_component_valtuple_new_empty _wasmtime_component_valtuple_new_empty.restype = None -_wasmtime_component_valtuple_new_empty.argtypes = [POINTER(wasmtime_component_valtuple_t)] +_wasmtime_component_valtuple_new_empty.argtypes = [ctypes.POINTER(wasmtime_component_valtuple_t)] def wasmtime_component_valtuple_new_empty(out: Any) -> None: return _wasmtime_component_valtuple_new_empty(out) # type: ignore _wasmtime_component_valtuple_new_uninit = dll.wasmtime_component_valtuple_new_uninit _wasmtime_component_valtuple_new_uninit.restype = None -_wasmtime_component_valtuple_new_uninit.argtypes = [POINTER(wasmtime_component_valtuple_t), c_size_t] +_wasmtime_component_valtuple_new_uninit.argtypes = [ctypes.POINTER(wasmtime_component_valtuple_t), ctypes.c_size_t] def wasmtime_component_valtuple_new_uninit(out: Any, size: Any) -> None: return _wasmtime_component_valtuple_new_uninit(out, size) # type: ignore _wasmtime_component_valtuple_copy = dll.wasmtime_component_valtuple_copy _wasmtime_component_valtuple_copy.restype = None -_wasmtime_component_valtuple_copy.argtypes = [POINTER(wasmtime_component_valtuple_t), POINTER(wasmtime_component_valtuple_t)] +_wasmtime_component_valtuple_copy.argtypes = [ctypes.POINTER(wasmtime_component_valtuple_t), ctypes.POINTER(wasmtime_component_valtuple_t)] def wasmtime_component_valtuple_copy(dst: Any, src: Any) -> None: return _wasmtime_component_valtuple_copy(dst, src) # type: ignore _wasmtime_component_valtuple_delete = dll.wasmtime_component_valtuple_delete _wasmtime_component_valtuple_delete.restype = None -_wasmtime_component_valtuple_delete.argtypes = [POINTER(wasmtime_component_valtuple_t)] +_wasmtime_component_valtuple_delete.argtypes = [ctypes.POINTER(wasmtime_component_valtuple_t)] def wasmtime_component_valtuple_delete(value: Any) -> None: return _wasmtime_component_valtuple_delete(value) # type: ignore -class wasmtime_component_valflags(Structure): +class wasmtime_component_valflags(ctypes.Structure): _fields_ = [ - ("size", c_size_t), - ("data", POINTER(wasm_name_t)), + ("size", ctypes.c_size_t), + ("data", ctypes.POINTER(wasm_name_t)), ] size: int data: ctypes._Pointer @@ -4448,84 +4447,84 @@ class wasmtime_component_valflags(Structure): _wasmtime_component_valflags_new = dll.wasmtime_component_valflags_new _wasmtime_component_valflags_new.restype = None -_wasmtime_component_valflags_new.argtypes = [POINTER(wasmtime_component_valflags_t), c_size_t, POINTER(wasm_name_t)] +_wasmtime_component_valflags_new.argtypes = [ctypes.POINTER(wasmtime_component_valflags_t), ctypes.c_size_t, ctypes.POINTER(wasm_name_t)] def wasmtime_component_valflags_new(out: Any, size: Any, ptr: Any) -> None: return _wasmtime_component_valflags_new(out, size, ptr) # type: ignore _wasmtime_component_valflags_new_empty = dll.wasmtime_component_valflags_new_empty _wasmtime_component_valflags_new_empty.restype = None -_wasmtime_component_valflags_new_empty.argtypes = [POINTER(wasmtime_component_valflags_t)] +_wasmtime_component_valflags_new_empty.argtypes = [ctypes.POINTER(wasmtime_component_valflags_t)] def wasmtime_component_valflags_new_empty(out: Any) -> None: return _wasmtime_component_valflags_new_empty(out) # type: ignore _wasmtime_component_valflags_new_uninit = dll.wasmtime_component_valflags_new_uninit _wasmtime_component_valflags_new_uninit.restype = None -_wasmtime_component_valflags_new_uninit.argtypes = [POINTER(wasmtime_component_valflags_t), c_size_t] +_wasmtime_component_valflags_new_uninit.argtypes = [ctypes.POINTER(wasmtime_component_valflags_t), ctypes.c_size_t] def wasmtime_component_valflags_new_uninit(out: Any, size: Any) -> None: return _wasmtime_component_valflags_new_uninit(out, size) # type: ignore _wasmtime_component_valflags_copy = dll.wasmtime_component_valflags_copy _wasmtime_component_valflags_copy.restype = None -_wasmtime_component_valflags_copy.argtypes = [POINTER(wasmtime_component_valflags_t), POINTER(wasmtime_component_valflags_t)] +_wasmtime_component_valflags_copy.argtypes = [ctypes.POINTER(wasmtime_component_valflags_t), ctypes.POINTER(wasmtime_component_valflags_t)] def wasmtime_component_valflags_copy(dst: Any, src: Any) -> None: return _wasmtime_component_valflags_copy(dst, src) # type: ignore _wasmtime_component_valflags_delete = dll.wasmtime_component_valflags_delete _wasmtime_component_valflags_delete.restype = None -_wasmtime_component_valflags_delete.argtypes = [POINTER(wasmtime_component_valflags_t)] +_wasmtime_component_valflags_delete.argtypes = [ctypes.POINTER(wasmtime_component_valflags_t)] def wasmtime_component_valflags_delete(value: Any) -> None: return _wasmtime_component_valflags_delete(value) # type: ignore -class wasmtime_component_valvariant(Structure): +class wasmtime_component_valvariant(ctypes.Structure): _fields_ = [ ("discriminant", wasm_name_t), - ("val", POINTER(wasmtime_component_val)), + ("val", ctypes.POINTER(wasmtime_component_val)), ] discriminant: wasm_name_t val: ctypes._Pointer wasmtime_component_valvariant_t = wasmtime_component_valvariant -class wasmtime_component_valresult(Structure): +class wasmtime_component_valresult(ctypes.Structure): _fields_ = [ - ("is_ok", c_bool), - ("val", POINTER(wasmtime_component_val)), + ("is_ok", ctypes.c_bool), + ("val", ctypes.POINTER(wasmtime_component_val)), ] is_ok: bool val: ctypes._Pointer wasmtime_component_valresult_t = wasmtime_component_valresult -class wasmtime_component_valunion(Union): +class wasmtime_component_valunion(ctypes.Union): _fields_ = [ - ("boolean", c_bool), - ("s8", c_int8), - ("u8", c_uint8), - ("s16", c_int16), - ("u16", c_uint16), - ("s32", c_int32), - ("u32", c_uint32), - ("s64", c_int64), - ("u64", c_uint64), - ("f32", c_float), - ("f64", c_double), - ("character", c_uint32), + ("boolean", ctypes.c_bool), + ("s8", ctypes.c_int8), + ("u8", ctypes.c_uint8), + ("s16", ctypes.c_int16), + ("u16", ctypes.c_uint16), + ("s32", ctypes.c_int32), + ("u32", ctypes.c_uint32), + ("s64", ctypes.c_int64), + ("u64", ctypes.c_uint64), + ("f32", ctypes.c_float), + ("f64", ctypes.c_double), + ("character", ctypes.c_uint32), ("string", wasm_name_t), ("list", wasmtime_component_vallist_t), ("record", wasmtime_component_valrecord_t), ("tuple", wasmtime_component_valtuple_t), ("variant", wasmtime_component_valvariant_t), ("enumeration", wasm_name_t), - ("option", POINTER(wasmtime_component_val)), + ("option", ctypes.POINTER(wasmtime_component_val)), ("result", wasmtime_component_valresult_t), ("flags", wasmtime_component_valflags_t), - ("resource", POINTER(wasmtime_component_resource_any_t)), + ("resource", ctypes.POINTER(wasmtime_component_resource_any_t)), ] boolean: bool - s8: c_int8 - u8: c_uint8 - s16: c_int16 - u16: c_uint16 + s8: ctypes.c_int8 + u8: ctypes.c_uint8 + s16: ctypes.c_int16 + u16: ctypes.c_uint16 s32: int u32: int s64: int @@ -4561,41 +4560,41 @@ class wasmtime_component_valunion(Union): wasmtime_component_valrecord_entry_t = wasmtime_component_valrecord_entry _wasmtime_component_val_new = dll.wasmtime_component_val_new -_wasmtime_component_val_new.restype = POINTER(wasmtime_component_val_t) -_wasmtime_component_val_new.argtypes = [POINTER(wasmtime_component_val_t)] +_wasmtime_component_val_new.restype = ctypes.POINTER(wasmtime_component_val_t) +_wasmtime_component_val_new.argtypes = [ctypes.POINTER(wasmtime_component_val_t)] def wasmtime_component_val_new(val: Any) -> ctypes._Pointer: return _wasmtime_component_val_new(val) # type: ignore _wasmtime_component_val_free = dll.wasmtime_component_val_free _wasmtime_component_val_free.restype = None -_wasmtime_component_val_free.argtypes = [POINTER(wasmtime_component_val_t)] +_wasmtime_component_val_free.argtypes = [ctypes.POINTER(wasmtime_component_val_t)] def wasmtime_component_val_free(ptr: Any) -> None: return _wasmtime_component_val_free(ptr) # type: ignore _wasmtime_component_val_clone = dll.wasmtime_component_val_clone _wasmtime_component_val_clone.restype = None -_wasmtime_component_val_clone.argtypes = [POINTER(wasmtime_component_val_t), POINTER(wasmtime_component_val_t)] +_wasmtime_component_val_clone.argtypes = [ctypes.POINTER(wasmtime_component_val_t), ctypes.POINTER(wasmtime_component_val_t)] def wasmtime_component_val_clone(src: Any, dst: Any) -> None: return _wasmtime_component_val_clone(src, dst) # type: ignore _wasmtime_component_val_delete = dll.wasmtime_component_val_delete _wasmtime_component_val_delete.restype = None -_wasmtime_component_val_delete.argtypes = [POINTER(wasmtime_component_val_t)] +_wasmtime_component_val_delete.argtypes = [ctypes.POINTER(wasmtime_component_val_t)] def wasmtime_component_val_delete(value: Any) -> None: return _wasmtime_component_val_delete(value) # type: ignore -class wasmtime_component_func_anon_0(Structure): +class wasmtime_component_func_anon_0(ctypes.Structure): _fields_ = [ - ("store_id", c_uint64), - ("__private1", c_uint32), + ("store_id", ctypes.c_uint64), + ("__private1", ctypes.c_uint32), ] store_id: int __private1: int -class wasmtime_component_func(Structure): +class wasmtime_component_func(ctypes.Structure): _fields_ = [ ("_anon_1", wasmtime_component_func_anon_0), - ("__private2", c_uint32), + ("__private2", ctypes.c_uint32), ] _anon_1: wasmtime_component_func_anon_0 __private2: int @@ -4603,27 +4602,27 @@ class wasmtime_component_func(Structure): wasmtime_component_func_t = wasmtime_component_func _wasmtime_component_func_type = dll.wasmtime_component_func_type -_wasmtime_component_func_type.restype = POINTER(wasmtime_component_func_type_t) -_wasmtime_component_func_type.argtypes = [POINTER(wasmtime_component_func_t), POINTER(wasmtime_context_t)] +_wasmtime_component_func_type.restype = ctypes.POINTER(wasmtime_component_func_type_t) +_wasmtime_component_func_type.argtypes = [ctypes.POINTER(wasmtime_component_func_t), ctypes.POINTER(wasmtime_context_t)] def wasmtime_component_func_type(func: Any, context: Any) -> ctypes._Pointer: return _wasmtime_component_func_type(func, context) # type: ignore _wasmtime_component_func_call = dll.wasmtime_component_func_call -_wasmtime_component_func_call.restype = POINTER(wasmtime_error_t) -_wasmtime_component_func_call.argtypes = [POINTER(wasmtime_component_func_t), POINTER(wasmtime_context_t), POINTER(wasmtime_component_val_t), c_size_t, POINTER(wasmtime_component_val_t), c_size_t] +_wasmtime_component_func_call.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_func_call.argtypes = [ctypes.POINTER(wasmtime_component_func_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_component_val_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_val_t), ctypes.c_size_t] def wasmtime_component_func_call(func: Any, context: Any, args: Any, args_size: Any, results: Any, results_size: Any) -> ctypes._Pointer: return _wasmtime_component_func_call(func, context, args, args_size, results, results_size) # type: ignore _wasmtime_component_func_post_return = dll.wasmtime_component_func_post_return -_wasmtime_component_func_post_return.restype = POINTER(wasmtime_error_t) -_wasmtime_component_func_post_return.argtypes = [POINTER(wasmtime_component_func_t), POINTER(wasmtime_context_t)] +_wasmtime_component_func_post_return.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_func_post_return.argtypes = [ctypes.POINTER(wasmtime_component_func_t), ctypes.POINTER(wasmtime_context_t)] def wasmtime_component_func_post_return(func: Any, context: Any) -> ctypes._Pointer: return _wasmtime_component_func_post_return(func, context) # type: ignore -class wasmtime_component_instance(Structure): +class wasmtime_component_instance(ctypes.Structure): _fields_ = [ - ("store_id", c_uint64), - ("__private", c_uint32), + ("store_id", ctypes.c_uint64), + ("__private", ctypes.c_uint32), ] store_id: int __private: int @@ -4631,101 +4630,101 @@ class wasmtime_component_instance(Structure): wasmtime_component_instance_t = wasmtime_component_instance _wasmtime_component_instance_get_export_index = dll.wasmtime_component_instance_get_export_index -_wasmtime_component_instance_get_export_index.restype = POINTER(wasmtime_component_export_index_t) -_wasmtime_component_instance_get_export_index.argtypes = [POINTER(wasmtime_component_instance_t), POINTER(wasmtime_context_t), POINTER(wasmtime_component_export_index_t), POINTER(c_char), c_size_t] +_wasmtime_component_instance_get_export_index.restype = ctypes.POINTER(wasmtime_component_export_index_t) +_wasmtime_component_instance_get_export_index.argtypes = [ctypes.POINTER(wasmtime_component_instance_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_component_export_index_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t] def wasmtime_component_instance_get_export_index(instance: Any, context: Any, instance_export_index: Any, name: Any, name_len: Any) -> ctypes._Pointer: return _wasmtime_component_instance_get_export_index(instance, context, instance_export_index, name, name_len) # type: ignore _wasmtime_component_instance_get_func = dll.wasmtime_component_instance_get_func -_wasmtime_component_instance_get_func.restype = c_bool -_wasmtime_component_instance_get_func.argtypes = [POINTER(wasmtime_component_instance_t), POINTER(wasmtime_context_t), POINTER(wasmtime_component_export_index_t), POINTER(wasmtime_component_func_t)] +_wasmtime_component_instance_get_func.restype = ctypes.c_bool +_wasmtime_component_instance_get_func.argtypes = [ctypes.POINTER(wasmtime_component_instance_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_component_export_index_t), ctypes.POINTER(wasmtime_component_func_t)] def wasmtime_component_instance_get_func(instance: Any, context: Any, export_index: Any, func_out: Any) -> bool: return _wasmtime_component_instance_get_func(instance, context, export_index, func_out) # type: ignore -class wasmtime_component_linker_t(Structure): +class wasmtime_component_linker_t(ctypes.Structure): pass -class wasmtime_component_linker_instance_t(Structure): +class wasmtime_component_linker_instance_t(ctypes.Structure): pass _wasmtime_component_linker_new = dll.wasmtime_component_linker_new -_wasmtime_component_linker_new.restype = POINTER(wasmtime_component_linker_t) -_wasmtime_component_linker_new.argtypes = [POINTER(wasm_engine_t)] +_wasmtime_component_linker_new.restype = ctypes.POINTER(wasmtime_component_linker_t) +_wasmtime_component_linker_new.argtypes = [ctypes.POINTER(wasm_engine_t)] def wasmtime_component_linker_new(engine: Any) -> ctypes._Pointer: return _wasmtime_component_linker_new(engine) # type: ignore _wasmtime_component_linker_allow_shadowing = dll.wasmtime_component_linker_allow_shadowing _wasmtime_component_linker_allow_shadowing.restype = None -_wasmtime_component_linker_allow_shadowing.argtypes = [POINTER(wasmtime_component_linker_t), c_bool] +_wasmtime_component_linker_allow_shadowing.argtypes = [ctypes.POINTER(wasmtime_component_linker_t), ctypes.c_bool] def wasmtime_component_linker_allow_shadowing(linker: Any, allow: Any) -> None: return _wasmtime_component_linker_allow_shadowing(linker, allow) # type: ignore _wasmtime_component_linker_root = dll.wasmtime_component_linker_root -_wasmtime_component_linker_root.restype = POINTER(wasmtime_component_linker_instance_t) -_wasmtime_component_linker_root.argtypes = [POINTER(wasmtime_component_linker_t)] +_wasmtime_component_linker_root.restype = ctypes.POINTER(wasmtime_component_linker_instance_t) +_wasmtime_component_linker_root.argtypes = [ctypes.POINTER(wasmtime_component_linker_t)] def wasmtime_component_linker_root(linker: Any) -> ctypes._Pointer: return _wasmtime_component_linker_root(linker) # type: ignore _wasmtime_component_linker_instantiate = dll.wasmtime_component_linker_instantiate -_wasmtime_component_linker_instantiate.restype = POINTER(wasmtime_error_t) -_wasmtime_component_linker_instantiate.argtypes = [POINTER(wasmtime_component_linker_t), POINTER(wasmtime_context_t), POINTER(wasmtime_component_t), POINTER(wasmtime_component_instance_t)] +_wasmtime_component_linker_instantiate.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_linker_instantiate.argtypes = [ctypes.POINTER(wasmtime_component_linker_t), ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_component_t), ctypes.POINTER(wasmtime_component_instance_t)] def wasmtime_component_linker_instantiate(linker: Any, context: Any, component: Any, instance_out: Any) -> ctypes._Pointer: return _wasmtime_component_linker_instantiate(linker, context, component, instance_out) # type: ignore _wasmtime_component_linker_define_unknown_imports_as_traps = dll.wasmtime_component_linker_define_unknown_imports_as_traps -_wasmtime_component_linker_define_unknown_imports_as_traps.restype = POINTER(wasmtime_error_t) -_wasmtime_component_linker_define_unknown_imports_as_traps.argtypes = [POINTER(wasmtime_component_linker_t), POINTER(wasmtime_component_t)] +_wasmtime_component_linker_define_unknown_imports_as_traps.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_linker_define_unknown_imports_as_traps.argtypes = [ctypes.POINTER(wasmtime_component_linker_t), ctypes.POINTER(wasmtime_component_t)] def wasmtime_component_linker_define_unknown_imports_as_traps(linker: Any, component: Any) -> ctypes._Pointer: return _wasmtime_component_linker_define_unknown_imports_as_traps(linker, component) # type: ignore _wasmtime_component_linker_delete = dll.wasmtime_component_linker_delete _wasmtime_component_linker_delete.restype = None -_wasmtime_component_linker_delete.argtypes = [POINTER(wasmtime_component_linker_t)] +_wasmtime_component_linker_delete.argtypes = [ctypes.POINTER(wasmtime_component_linker_t)] def wasmtime_component_linker_delete(linker: Any) -> None: return _wasmtime_component_linker_delete(linker) # type: ignore _wasmtime_component_linker_instance_add_instance = dll.wasmtime_component_linker_instance_add_instance -_wasmtime_component_linker_instance_add_instance.restype = POINTER(wasmtime_error_t) -_wasmtime_component_linker_instance_add_instance.argtypes = [POINTER(wasmtime_component_linker_instance_t), POINTER(c_char), c_size_t, POINTER(POINTER(wasmtime_component_linker_instance_t))] +_wasmtime_component_linker_instance_add_instance.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_linker_instance_add_instance.argtypes = [ctypes.POINTER(wasmtime_component_linker_instance_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.POINTER(wasmtime_component_linker_instance_t))] def wasmtime_component_linker_instance_add_instance(linker_instance: Any, name: Any, name_len: Any, linker_instance_out: Any) -> ctypes._Pointer: return _wasmtime_component_linker_instance_add_instance(linker_instance, name, name_len, linker_instance_out) # type: ignore _wasmtime_component_linker_instance_add_module = dll.wasmtime_component_linker_instance_add_module -_wasmtime_component_linker_instance_add_module.restype = POINTER(wasmtime_error_t) -_wasmtime_component_linker_instance_add_module.argtypes = [POINTER(wasmtime_component_linker_instance_t), POINTER(c_char), c_size_t, POINTER(wasmtime_module_t)] +_wasmtime_component_linker_instance_add_module.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_linker_instance_add_module.argtypes = [ctypes.POINTER(wasmtime_component_linker_instance_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_module_t)] def wasmtime_component_linker_instance_add_module(linker_instance: Any, name: Any, name_len: Any, module: Any) -> ctypes._Pointer: return _wasmtime_component_linker_instance_add_module(linker_instance, name, name_len, module) # type: ignore -wasmtime_component_func_callback_t = CFUNCTYPE(c_size_t, c_void_p, POINTER(wasmtime_context_t), POINTER(wasmtime_component_func_type_t), POINTER(wasmtime_component_val_t), c_size_t, POINTER(wasmtime_component_val_t), c_size_t) +wasmtime_component_func_callback_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.POINTER(wasmtime_context_t), ctypes.POINTER(wasmtime_component_func_type_t), ctypes.POINTER(wasmtime_component_val_t), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_val_t), ctypes.c_size_t) _wasmtime_component_linker_instance_add_func = dll.wasmtime_component_linker_instance_add_func -_wasmtime_component_linker_instance_add_func.restype = POINTER(wasmtime_error_t) -_wasmtime_component_linker_instance_add_func.argtypes = [POINTER(wasmtime_component_linker_instance_t), POINTER(c_char), c_size_t, wasmtime_component_func_callback_t, c_void_p, CFUNCTYPE(None, c_void_p)] +_wasmtime_component_linker_instance_add_func.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_linker_instance_add_func.argtypes = [ctypes.POINTER(wasmtime_component_linker_instance_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, wasmtime_component_func_callback_t, ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasmtime_component_linker_instance_add_func(linker_instance: Any, name: Any, name_len: Any, callback: Any, data: Any, finalizer: Any) -> ctypes._Pointer: return _wasmtime_component_linker_instance_add_func(linker_instance, name, name_len, callback, data, finalizer) # type: ignore _wasmtime_component_linker_add_wasip2 = dll.wasmtime_component_linker_add_wasip2 -_wasmtime_component_linker_add_wasip2.restype = POINTER(wasmtime_error_t) -_wasmtime_component_linker_add_wasip2.argtypes = [POINTER(wasmtime_component_linker_t)] +_wasmtime_component_linker_add_wasip2.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_linker_add_wasip2.argtypes = [ctypes.POINTER(wasmtime_component_linker_t)] def wasmtime_component_linker_add_wasip2(linker: Any) -> ctypes._Pointer: return _wasmtime_component_linker_add_wasip2(linker) # type: ignore -wasmtime_component_resource_destructor_t = CFUNCTYPE(c_size_t, c_void_p, POINTER(wasmtime_context_t), c_uint32) +wasmtime_component_resource_destructor_t = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.c_void_p, ctypes.POINTER(wasmtime_context_t), ctypes.c_uint32) _wasmtime_component_linker_instance_add_resource = dll.wasmtime_component_linker_instance_add_resource -_wasmtime_component_linker_instance_add_resource.restype = POINTER(wasmtime_error_t) -_wasmtime_component_linker_instance_add_resource.argtypes = [POINTER(wasmtime_component_linker_instance_t), POINTER(c_char), c_size_t, POINTER(wasmtime_component_resource_type_t), wasmtime_component_resource_destructor_t, c_void_p, CFUNCTYPE(None, c_void_p)] +_wasmtime_component_linker_instance_add_resource.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_component_linker_instance_add_resource.argtypes = [ctypes.POINTER(wasmtime_component_linker_instance_t), ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasmtime_component_resource_type_t), wasmtime_component_resource_destructor_t, ctypes.c_void_p, ctypes.CFUNCTYPE(None, ctypes.c_void_p)] def wasmtime_component_linker_instance_add_resource(linker_instance: Any, name: Any, name_len: Any, resource: Any, destructor: Any, data: Any, finalizer: Any) -> ctypes._Pointer: return _wasmtime_component_linker_instance_add_resource(linker_instance, name, name_len, resource, destructor, data, finalizer) # type: ignore _wasmtime_component_linker_instance_delete = dll.wasmtime_component_linker_instance_delete _wasmtime_component_linker_instance_delete.restype = None -_wasmtime_component_linker_instance_delete.argtypes = [POINTER(wasmtime_component_linker_instance_t)] +_wasmtime_component_linker_instance_delete.argtypes = [ctypes.POINTER(wasmtime_component_linker_instance_t)] def wasmtime_component_linker_instance_delete(linker_instance: Any) -> None: return _wasmtime_component_linker_instance_delete(linker_instance) # type: ignore _wasmtime_wat2wasm = dll.wasmtime_wat2wasm -_wasmtime_wat2wasm.restype = POINTER(wasmtime_error_t) -_wasmtime_wat2wasm.argtypes = [POINTER(c_char), c_size_t, POINTER(wasm_byte_vec_t)] +_wasmtime_wat2wasm.restype = ctypes.POINTER(wasmtime_error_t) +_wasmtime_wat2wasm.argtypes = [ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(wasm_byte_vec_t)] def wasmtime_wat2wasm(wat: Any, wat_len: Any, ret: Any) -> ctypes._Pointer: return _wasmtime_wat2wasm(wat, wat_len, ret) # type: ignore diff --git a/wasmtime/_config.py b/wasmtime/_config.py index 972066bc..f4b59f3c 100644 --- a/wasmtime/_config.py +++ b/wasmtime/_config.py @@ -1,5 +1,4 @@ from . import _ffi as ffi -from ctypes import * import ctypes from wasmtime import WasmtimeError, Managed import typing @@ -235,7 +234,8 @@ def cache(self, enabled: typing.Union[bool, str]) -> None: error = ffi.wasmtime_config_cache_config_load(self.ptr(), None) elif isinstance(enabled, str): error = ffi.wasmtime_config_cache_config_load(self.ptr(), - c_char_p(enabled.encode('utf-8'))) + ctypes.c_char_p(enabled.encode('utf-8')), + ) else: raise TypeError("expected string or bool") if error: diff --git a/wasmtime/_ffi.py b/wasmtime/_ffi.py index 7d05af3d..2f277b38 100644 --- a/wasmtime/_ffi.py +++ b/wasmtime/_ffi.py @@ -1,4 +1,5 @@ -from ctypes import * +from ctypes import POINTER, Structure, Union, addressof, byref, cdll, string_at +from ctypes import c_double, c_float, c_int32, c_int64, c_uint8 from pathlib import Path import ctypes import sys diff --git a/wasmtime/_func.py b/wasmtime/_func.py index d1c89fe2..2e38b29b 100644 --- a/wasmtime/_func.py +++ b/wasmtime/_func.py @@ -154,7 +154,7 @@ def get(self, name: str) -> Optional[AsExtern]: # First convert to a raw name so we can typecheck our argument name_bytes = name.encode('utf-8') - name_buf = ffi.create_string_buffer(name_bytes) + name_buf = ctypes.create_string_buffer(name_bytes) # Next see if we've been invalidated if self.__ptr is None: diff --git a/wasmtime/_globals.py b/wasmtime/_globals.py index ff60078a..1af0041c 100644 --- a/wasmtime/_globals.py +++ b/wasmtime/_globals.py @@ -1,5 +1,6 @@ +import ctypes + from . import _ffi as ffi -from ctypes import * from wasmtime import GlobalType, Val, WasmtimeError from typing import Any from ._store import Storelike @@ -16,9 +17,9 @@ def __init__(self, store: Storelike, ty: GlobalType, val: Any): error = ffi.wasmtime_global_new( store._context(), ty.ptr(), - byref(val), - byref(global_)) - ffi.wasmtime_val_unroot(byref(val)) + ctypes.byref(val), + ctypes.byref(global_)) + ffi.wasmtime_val_unroot(ctypes.byref(val)) if error: raise WasmtimeError._from_ptr(error) self._global = global_ @@ -34,7 +35,7 @@ def type(self, store: Storelike) -> GlobalType: Gets the type of this global as a `GlobalType` """ - ptr = ffi.wasmtime_global_type(store._context(), byref(self._global)) + ptr = ffi.wasmtime_global_type(store._context(), ctypes.byref(self._global)) return GlobalType._from_ptr(ptr, None) def value(self, store: Storelike) -> Any: @@ -44,7 +45,7 @@ def value(self, store: Storelike) -> Any: Returns a native python type """ raw = ffi.wasmtime_val_t() - ffi.wasmtime_global_get(store._context(), byref(self._global), byref(raw)) + ffi.wasmtime_global_get(store._context(), ctypes.byref(self._global), ctypes.byref(raw)) val = Val._from_raw(store, raw) if val.value is not None: return val.value @@ -56,8 +57,8 @@ def set_value(self, store: Storelike, val: Any) -> None: Sets the value of this global to a new value """ val = Val._convert_to_raw(store, self.type(store).content, val) - error = ffi.wasmtime_global_set(store._context(), byref(self._global), byref(val)) - ffi.wasmtime_val_unroot(byref(val)) + error = ffi.wasmtime_global_set(store._context(), ctypes.byref(self._global), ctypes.byref(val)) + ffi.wasmtime_val_unroot(ctypes.byref(val)) if error: raise WasmtimeError._from_ptr(error) diff --git a/wasmtime/_instance.py b/wasmtime/_instance.py index f1ed709b..e6132a49 100644 --- a/wasmtime/_instance.py +++ b/wasmtime/_instance.py @@ -1,3 +1,5 @@ +import ctypes + from . import _ffi as ffi from ctypes import POINTER, byref from wasmtime import Module, WasmtimeError @@ -72,8 +74,8 @@ def __init__(self, store: Storelike, instance: Instance): extern_list = [] i = 0 item = ffi.wasmtime_extern_t() - name_ptr = POINTER(ffi.c_char)() - name_len = ffi.c_size_t(0) + name_ptr = ctypes.POINTER(ctypes.c_char)() + name_len = ctypes.c_size_t(0) while ffi.wasmtime_instance_export_nth( store._context(), byref(instance._instance), diff --git a/wasmtime/_linker.py b/wasmtime/_linker.py index 37551cc6..cfb4c5ea 100644 --- a/wasmtime/_linker.py +++ b/wasmtime/_linker.py @@ -1,5 +1,4 @@ import ctypes -from ctypes import * from typing import Any from wasmtime import Instance, Engine, FuncType from wasmtime import Module, WasmtimeError, Func, Managed @@ -47,9 +46,9 @@ def define(self, store: Storelike, module: str, name: str, item: AsExtern) -> No """ raw_item = get_extern_ptr(item) module_bytes = module.encode('utf-8') - module_buf = create_string_buffer(module_bytes) + module_buf = ctypes.create_string_buffer(module_bytes) name_bytes = name.encode('utf-8') - name_buf = create_string_buffer(name_bytes) + name_buf = ctypes.create_string_buffer(name_bytes) error = ffi.wasmtime_linker_define( self.ptr(), store._context(), @@ -57,7 +56,7 @@ def define(self, store: Storelike, module: str, name: str, item: AsExtern) -> No len(module_bytes), name_buf, len(name_bytes), - byref(raw_item)) + ctypes.byref(raw_item)) if error: raise WasmtimeError._from_ptr(error) @@ -71,9 +70,9 @@ def define_func(self, module: str, name: str, ty: FuncType, func: Callable[..., the linker can be used to instantiate modules in multiple stores. """ module_bytes = module.encode('utf-8') - module_buf = create_string_buffer(module_bytes) + module_buf = ctypes.create_string_buffer(module_bytes) name_bytes = name.encode('utf-8') - name_buf = create_string_buffer(name_bytes) + name_buf = ctypes.create_string_buffer(name_bytes) if not isinstance(ty, FuncType): raise TypeError("expected a FuncType") idx = FUNCTIONS.allocate((func, ty.results, access_caller)) @@ -104,12 +103,12 @@ def define_instance(self, store: Storelike, name: str, instance: Instance) -> No if not isinstance(instance, Instance): raise TypeError("expected an `Instance`") name_bytes = name.encode('utf8') - name_buf = create_string_buffer(name_bytes) + name_buf = ctypes.create_string_buffer(name_bytes) error = ffi.wasmtime_linker_define_instance(self.ptr(), store._context(), name_buf, len(name_bytes), - byref(instance._instance)) + ctypes.byref(instance._instance)) if error: raise WasmtimeError._from_ptr(error) @@ -144,7 +143,7 @@ def define_module(self, store: Storelike, name: str, module: Module) -> None: if not isinstance(module, Module): raise TypeError("expected a `Module`") name_bytes = name.encode('utf-8') - name_buf = create_string_buffer(name_bytes) + name_buf = ctypes.create_string_buffer(name_bytes) error = ffi.wasmtime_linker_module(self.ptr(), store._context(), name_buf, len(name_bytes), module.ptr()) if error: raise WasmtimeError._from_ptr(error) @@ -160,11 +159,11 @@ def instantiate(self, store: Storelike, module: Module) -> Instance: Raises an error if an import of `module` hasn't been defined in this linker or if a trap happens while instantiating the instance. """ - trap = POINTER(ffi.wasm_trap_t)() + trap = ctypes.POINTER(ffi.wasm_trap_t)() instance = ffi.wasmtime_instance_t() with enter_wasm(store) as trap: error = ffi.wasmtime_linker_instantiate( - self.ptr(), store._context(), module.ptr(), byref(instance), trap) + self.ptr(), store._context(), module.ptr(), ctypes.byref(instance), trap) if error: raise WasmtimeError._from_ptr(error) return Instance._from_raw(instance) @@ -179,10 +178,10 @@ def get_default(self, store: Storelike, name: str) -> Func: Raises an error if the default export wasn't present. """ name_bytes = name.encode('utf-8') - name_buf = create_string_buffer(name_bytes) + name_buf = ctypes.create_string_buffer(name_bytes) func = ffi.wasmtime_func_t() error = ffi.wasmtime_linker_get_default(self.ptr(), store._context(), - name_buf, len(name_bytes), byref(func)) + name_buf, len(name_bytes), ctypes.byref(func)) if error: raise WasmtimeError._from_ptr(error) return Func._from_raw(func) @@ -195,14 +194,14 @@ def get(self, store: Storelike, module: str, name: str) -> AsExtern: defined twice with different types. """ module_bytes = module.encode('utf-8') - module_buf = create_string_buffer(module_bytes) + module_buf = ctypes.create_string_buffer(module_bytes) name_bytes = name.encode('utf-8') - name_buf = create_string_buffer(name_bytes) + name_buf = ctypes.create_string_buffer(name_bytes) item = ffi.wasmtime_extern_t() ok = ffi.wasmtime_linker_get(self.ptr(), store._context(), module_buf, len(module_bytes), name_buf, len(name_bytes), - byref(item)) + ctypes.byref(item)) if ok: return wrap_extern(item) raise WasmtimeError("item not defined in linker") diff --git a/wasmtime/_memory.py b/wasmtime/_memory.py index 7c8e03a0..3f9073af 100644 --- a/wasmtime/_memory.py +++ b/wasmtime/_memory.py @@ -1,5 +1,4 @@ from . import _ffi as ffi -from ctypes import * import ctypes import typing from wasmtime import MemoryType, WasmtimeError @@ -15,7 +14,7 @@ def __init__(self, store: Storelike, ty: MemoryType): """ mem = ffi.wasmtime_memory_t() - error = ffi.wasmtime_memory_new(store._context(), ty.ptr(), byref(mem)) + error = ffi.wasmtime_memory_new(store._context(), ty.ptr(), ctypes.byref(mem)) if error: raise WasmtimeError._from_ptr(error) self._memory = mem @@ -31,7 +30,7 @@ def type(self, store: Storelike) -> MemoryType: Gets the type of this memory as a `MemoryType` """ - ptr = ffi.wasmtime_memory_type(store._context(), byref(self._memory)) + ptr = ffi.wasmtime_memory_type(store._context(), ctypes.byref(self._memory)) return MemoryType._from_ptr(ptr, None) def grow(self, store: Storelike, delta: int) -> int: @@ -41,8 +40,8 @@ def grow(self, store: Storelike, delta: int) -> int: if delta < 0: raise WasmtimeError("cannot grow by negative amount") - prev = ffi.c_uint64(0) - error = ffi.wasmtime_memory_grow(store._context(), byref(self._memory), delta, byref(prev)) + prev = ctypes.c_uint64(0) + error = ffi.wasmtime_memory_grow(store._context(), ctypes.byref(self._memory), delta, ctypes.byref(prev)) if error: raise WasmtimeError._from_ptr(error) return prev.value @@ -52,16 +51,16 @@ def size(self, store: Storelike) -> int: Returns the size, in WebAssembly pages, of this memory. """ - return ffi.wasmtime_memory_size(store._context(), byref(self._memory)) + return ffi.wasmtime_memory_size(store._context(), ctypes.byref(self._memory)) - def data_ptr(self, store: Storelike) -> "ctypes._Pointer[c_ubyte]": + def data_ptr(self, store: Storelike) -> "ctypes._Pointer[ctypes.c_ubyte]": """ Returns the raw pointer in memory where this wasm memory lives. Remember that all accesses to wasm memory should be bounds-checked against the `data_len` method. """ - return ffi.wasmtime_memory_data(store._context(), byref(self._memory)) + return ffi.wasmtime_memory_data(store._context(), ctypes.byref(self._memory)) def get_buffer_ptr(self, store: Storelike, size: typing.Optional[int] = None, @@ -140,7 +139,7 @@ def data_len(self, store: Storelike) -> int: Returns the raw byte length of this memory. """ - return ffi.wasmtime_memory_data_size(store._context(), byref(self._memory)) + return ffi.wasmtime_memory_data_size(store._context(), ctypes.byref(self._memory)) def _as_extern(self) -> ffi.wasmtime_extern_t: union = ffi.wasmtime_extern_union(memory=self._memory) diff --git a/wasmtime/_module.py b/wasmtime/_module.py index 18013a6c..57249c77 100644 --- a/wasmtime/_module.py +++ b/wasmtime/_module.py @@ -1,6 +1,5 @@ from . import _ffi as ffi from ._wat2wasm import _to_wasm -from ctypes import * import ctypes from wasmtime import Engine, wat2wasm, ImportType, ExportType, WasmtimeError, Managed import typing @@ -28,9 +27,9 @@ def __init__(self, engine: Engine, wasm: typing.Union[str, bytes]): # TODO: can the copy be avoided here? I can't for the life of me # figure this out. - binary = (c_uint8 * len(wasm)).from_buffer_copy(wasm) - ptr = POINTER(ffi.wasmtime_module_t)() - error = ffi.wasmtime_module_new(engine.ptr(), binary, len(wasm), byref(ptr)) + binary = (ctypes.c_uint8 * len(wasm)).from_buffer_copy(wasm) + ptr = ctypes.POINTER(ffi.wasmtime_module_t)() + error = ffi.wasmtime_module_new(engine.ptr(), binary, len(wasm), ctypes.byref(ptr)) if error: raise WasmtimeError._from_ptr(error) self._set_ptr(ptr) @@ -40,7 +39,7 @@ def _delete(self, ptr: "ctypes._Pointer[ffi.wasmtime_module_t]") -> None: @classmethod def _from_ptr(cls, ptr: "ctypes._Pointer[ffi.wasmtime_module_t]") -> "Module": - if not isinstance(ptr, POINTER(ffi.wasmtime_module_t)): + if not isinstance(ptr, ctypes.POINTER(ffi.wasmtime_module_t)): raise TypeError("wrong pointer type") ty: "Module" = cls.__new__(cls) ty._set_ptr(ptr) @@ -60,15 +59,15 @@ def deserialize(cls, engine: Engine, encoded: typing.Union[bytes, bytearray]) -> if not isinstance(encoded, (bytes, bytearray)): raise TypeError("expected bytes") - ptr = POINTER(ffi.wasmtime_module_t)() + ptr = ctypes.POINTER(ffi.wasmtime_module_t)() # TODO: can the copy be avoided here? I can't for the life of me # figure this out. error = ffi.wasmtime_module_deserialize( engine.ptr(), - (c_uint8 * len(encoded)).from_buffer_copy(encoded), + (ctypes.c_uint8 * len(encoded)).from_buffer_copy(encoded), len(encoded), - byref(ptr)) + ctypes.byref(ptr)) if error: raise WasmtimeError._from_ptr(error) return cls._from_ptr(ptr) @@ -82,12 +81,12 @@ def deserialize_file(cls, engine: Engine, path: str) -> 'Module': Otherwise this function is the same as `Module.deserialize`. """ - ptr = POINTER(ffi.wasmtime_module_t)() + ptr = ctypes.POINTER(ffi.wasmtime_module_t)() path_bytes = path.encode('utf-8') error = ffi.wasmtime_module_deserialize_file( engine.ptr(), path_bytes, - byref(ptr)) + ctypes.byref(ptr)) if error: raise WasmtimeError._from_ptr(error) return cls._from_ptr(ptr) @@ -106,7 +105,7 @@ def validate(cls, engine: Engine, wasm: typing.Union[bytes, bytearray]) -> None: # TODO: can the copy be avoided here? I can't for the life of me # figure this out. - buf = (c_uint8 * len(wasm)).from_buffer_copy(wasm) + buf = (ctypes.c_uint8 * len(wasm)).from_buffer_copy(wasm) error = ffi.wasmtime_module_validate(engine.ptr(), buf, len(wasm)) if error: @@ -119,7 +118,7 @@ def imports(self) -> typing.List[ImportType]: """ imports = ImportTypeList() - ffi.wasmtime_module_imports(self.ptr(), byref(imports.vec)) + ffi.wasmtime_module_imports(self.ptr(), ctypes.byref(imports.vec)) ret = [] for i in range(0, imports.vec.size): ret.append(ImportType._from_ptr(imports.vec.data[i], imports)) @@ -132,7 +131,7 @@ def exports(self) -> typing.List[ExportType]: """ exports = ExportTypeList() - ffi.wasmtime_module_exports(self.ptr(), byref(exports.vec)) + ffi.wasmtime_module_exports(self.ptr(), ctypes.byref(exports.vec)) ret = [] for i in range(0, exports.vec.size): ret.append(ExportType._from_ptr(exports.vec.data[i], exports)) @@ -147,11 +146,11 @@ def serialize(self) -> bytearray: module. """ raw = ffi.wasm_byte_vec_t() - err = ffi.wasmtime_module_serialize(self.ptr(), byref(raw)) + err = ffi.wasmtime_module_serialize(self.ptr(), ctypes.byref(raw)) if err: raise WasmtimeError._from_ptr(err) ret = ffi.to_bytes(raw) - ffi.wasm_byte_vec_delete(byref(raw)) + ffi.wasm_byte_vec_delete(ctypes.byref(raw)) return ret @@ -160,7 +159,7 @@ def __init__(self) -> None: self.vec = ffi.wasm_importtype_vec_t(0, None) def __del__(self) -> None: - ffi.wasm_importtype_vec_delete(byref(self.vec)) + ffi.wasm_importtype_vec_delete(ctypes.byref(self.vec)) class ExportTypeList: @@ -168,4 +167,4 @@ def __init__(self) -> None: self.vec = ffi.wasm_exporttype_vec_t(0, None) def __del__(self) -> None: - ffi.wasm_exporttype_vec_delete(byref(self.vec)) + ffi.wasm_exporttype_vec_delete(ctypes.byref(self.vec)) diff --git a/wasmtime/_sharedmemory.py b/wasmtime/_sharedmemory.py index bfd18e4b..15f8c5c7 100644 --- a/wasmtime/_sharedmemory.py +++ b/wasmtime/_sharedmemory.py @@ -1,5 +1,4 @@ from . import _ffi as ffi -from ctypes import * import ctypes from typing import Optional, Any from wasmtime import MemoryType, WasmtimeError, Engine, Managed @@ -13,8 +12,8 @@ def __init__(self, engine: Engine, ty: MemoryType): Creates a new shared memory in `store` with the given `ty` """ - sharedmemory_ptr = POINTER(ffi.wasmtime_sharedmemory_t)() - error = ffi.wasmtime_sharedmemory_new(engine.ptr(), ty.ptr(), byref(sharedmemory_ptr)) + sharedmemory_ptr = ctypes.POINTER(ffi.wasmtime_sharedmemory_t)() + error = ffi.wasmtime_sharedmemory_new(engine.ptr(), ty.ptr(), ctypes.byref(sharedmemory_ptr)) if error: raise WasmtimeError._from_ptr(error) self._set_ptr(sharedmemory_ptr) @@ -24,7 +23,7 @@ def _delete(self, ptr: "ctypes._Pointer[ffi.wasmtime_sharedmemory_t]") -> None: @classmethod def _from_ptr(cls, ptr: "ctypes._Pointer[ffi.wasmtime_sharedmemory_t]") -> "SharedMemory": - if not isinstance(ptr, POINTER(ffi.wasmtime_sharedmemory_t)): + if not isinstance(ptr, ctypes.POINTER(ffi.wasmtime_sharedmemory_t)): raise TypeError("wrong shared memory pointer type provided to _from_ptr") ty: "SharedMemory" = cls.__new__(cls) @@ -46,8 +45,8 @@ def grow(self, delta: int) -> int: if delta < 0: raise WasmtimeError("cannot grow by negative amount") - prev = ffi.c_uint64(0) - error = ffi.wasmtime_sharedmemory_grow(self.ptr(), delta, byref(prev)) + prev = ctypes.c_uint64(0) + error = ffi.wasmtime_sharedmemory_grow(self.ptr(), delta, ctypes.byref(prev)) if error: raise WasmtimeError._from_ptr(error) return prev.value @@ -57,9 +56,9 @@ def size(self) -> int: Returns the size, in WebAssembly pages, of this shared memory. """ - return ffi.wasmtime_sharedmemory_size(byref(self.ptr())) + return ffi.wasmtime_sharedmemory_size(ctypes.byref(self.ptr())) - def data_ptr(self) -> "ctypes._Pointer[c_ubyte]": + def data_ptr(self) -> "ctypes._Pointer[ctypes.c_ubyte]": """ Returns the raw pointer in memory where this wasm shared memory lives. @@ -76,5 +75,5 @@ def data_len(self) -> int: return ffi.wasmtime_sharedmemory_data_size(self.ptr()) def _as_extern(self) -> ffi.wasmtime_extern_t: - union = ffi.wasmtime_extern_union(sharedmemory=pointer(self.ptr())) + union = ffi.wasmtime_extern_union(sharedmemory=ctypes.pointer(self.ptr())) return ffi.wasmtime_extern_t(ffi.WASMTIME_EXTERN_SHAREDMEMORY, union) diff --git a/wasmtime/_store.py b/wasmtime/_store.py index 87da563b..7fd34463 100644 --- a/wasmtime/_store.py +++ b/wasmtime/_store.py @@ -18,7 +18,7 @@ def __init__(self, engine: typing.Optional[Engine] = None, data: typing.Optional engine = Engine() elif not isinstance(engine, Engine): raise TypeError("expected an Engine") - data_id = ffi.c_void_p(0) + data_id = ctypes.c_void_p(0) finalize = cast(0, CFUNCTYPE(None, c_void_p)) if data: data_id = value._intern(data) diff --git a/wasmtime/_table.py b/wasmtime/_table.py index db90c379..584da8d1 100644 --- a/wasmtime/_table.py +++ b/wasmtime/_table.py @@ -1,5 +1,6 @@ +import ctypes + from . import _ffi as ffi -from ctypes import * from wasmtime import TableType, Store, WasmtimeError, Val from typing import Optional, Any from ._store import Storelike @@ -16,8 +17,8 @@ def __init__(self, store: Store, ty: TableType, init: Any): init_val = Val._convert_to_raw(store, ty.element, init) table = ffi.wasmtime_table_t() - error = ffi.wasmtime_table_new(store._context(), ty.ptr(), byref(init_val), byref(table)) - ffi.wasmtime_val_unroot(byref(init_val)) + error = ffi.wasmtime_table_new(store._context(), ty.ptr(), ctypes.byref(init_val), ctypes.byref(table)) + ffi.wasmtime_val_unroot(ctypes.byref(init_val)) if error: raise WasmtimeError._from_ptr(error) self._table = table @@ -33,14 +34,14 @@ def type(self, store: Storelike) -> TableType: Gets the type of this table as a `TableType` """ - ptr = ffi.wasmtime_table_type(store._context(), byref(self._table)) + ptr = ffi.wasmtime_table_type(store._context(), ctypes.byref(self._table)) return TableType._from_ptr(ptr, None) def size(self, store: Storelike) -> int: """ Gets the size, in elements, of this table """ - return ffi.wasmtime_table_size(store._context(), byref(self._table)) + return ffi.wasmtime_table_size(store._context(), ctypes.byref(self._table)) def grow(self, store: Storelike, amt: int, init: Any) -> int: """ @@ -51,9 +52,9 @@ def grow(self, store: Storelike, amt: int, init: Any) -> int: Returns the previous size of the table otherwise. """ init_val = Val._convert_to_raw(store, self.type(store).element, init) - prev = c_uint64(0) - error = ffi.wasmtime_table_grow(store._context(), byref(self._table), c_uint64(amt), byref(init_val), byref(prev)) - ffi.wasmtime_val_unroot(byref(init_val)) + prev = ctypes.c_uint64(0) + error = ffi.wasmtime_table_grow(store._context(), ctypes.byref(self._table), ctypes.c_uint64(amt), ctypes.byref(init_val), ctypes.byref(prev)) + ffi.wasmtime_val_unroot(ctypes.byref(init_val)) if error: raise WasmtimeError._from_ptr(error) return prev.value @@ -72,7 +73,7 @@ def get(self, store: Store, idx: int) -> Optional[Any]: Returns `None` if `idx` is out of bounds. """ raw = ffi.wasmtime_val_t() - ok = ffi.wasmtime_table_get(store._context(), byref(self._table), idx, byref(raw)) + ok = ffi.wasmtime_table_get(store._context(), ctypes.byref(self._table), idx, ctypes.byref(raw)) if not ok: return None val = Val._from_raw(store, raw) @@ -95,8 +96,8 @@ def set(self, store: Store, idx: int, val: Any) -> None: Raises a `WasmtimeError` if `idx` is out of bounds. """ value = Val._convert_to_raw(store, self.type(store).element, val) - error = ffi.wasmtime_table_set(store._context(), byref(self._table), idx, byref(value)) - ffi.wasmtime_val_unroot(byref(value)) + error = ffi.wasmtime_table_set(store._context(), ctypes.byref(self._table), idx, ctypes.byref(value)) + ffi.wasmtime_val_unroot(ctypes.byref(value)) if error: raise WasmtimeError._from_ptr(error) diff --git a/wasmtime/_trap.py b/wasmtime/_trap.py index e8a29715..741bf8e6 100644 --- a/wasmtime/_trap.py +++ b/wasmtime/_trap.py @@ -39,7 +39,7 @@ def __init__(self, message: str): """ vec = message.encode('utf-8') - self._set_ptr(ffi.wasmtime_trap_new(ffi.create_string_buffer(vec), len(vec))) + self._set_ptr(ffi.wasmtime_trap_new(ctypes.create_string_buffer(vec), len(vec))) def _delete(self, ptr: "ctypes._Pointer[ffi.wasm_trap_t]") -> None: ffi.wasm_trap_delete(ptr) diff --git a/wasmtime/_types.py b/wasmtime/_types.py index ed7ea8f6..018e1b49 100644 --- a/wasmtime/_types.py +++ b/wasmtime/_types.py @@ -328,7 +328,7 @@ def limits(self) -> Limits: Returns the limits on the size of this table """ minimum = ffi.wasmtime_memorytype_minimum(self.ptr()) - maximum = ffi.c_uint64(0) + maximum = ctypes.c_uint64(0) has_max = ffi.wasmtime_memorytype_maximum(self.ptr(), byref(maximum)) return Limits(minimum, maximum.value if has_max else None) diff --git a/wasmtime/_value.py b/wasmtime/_value.py index 9deb4bcd..00aa6cf5 100644 --- a/wasmtime/_value.py +++ b/wasmtime/_value.py @@ -1,15 +1,15 @@ from ._error import WasmtimeError -from ._ffi import * from ._types import ValType import ctypes import typing +from . import _ffi as ffi if typing.TYPE_CHECKING: from ._store import Storelike -@ctypes.CFUNCTYPE(None, c_void_p) +@ctypes.CFUNCTYPE(None, ctypes.c_void_p) def _externref_finalizer(extern_id: int) -> None: Val._id_to_ref_count[extern_id] -= 1 if Val._id_to_ref_count[extern_id] == 0: @@ -17,7 +17,7 @@ def _externref_finalizer(extern_id: int) -> None: del Val._id_to_extern[extern_id] -def _intern(obj: typing.Any) -> c_void_p: +def _intern(obj: typing.Any) -> ctypes.c_void_p: extern_id = id(obj) Val._id_to_ref_count.setdefault(extern_id, 0) Val._id_to_ref_count[extern_id] += 1 @@ -38,7 +38,7 @@ class Val: _id_to_extern: typing.Dict[int, typing.Any] = {} _id_to_ref_count: typing.Dict[int, int] = {} - _kind: wasmtime_valkind_t + _kind: ffi.wasmtime_valkind_t _val: typing.Any @classmethod @@ -48,8 +48,8 @@ def i32(cls, val: int) -> "Val": """ if not isinstance(val, int): raise TypeError("expected an integer") - val = wasmtime_valunion_t(i32=val).i32 - return Val(WASMTIME_I32, val) + val = ffi.wasmtime_valunion_t(i32=val).i32 + return Val(ffi.WASMTIME_I32, val) @classmethod def i64(cls, val: int) -> "Val": @@ -58,8 +58,8 @@ def i64(cls, val: int) -> "Val": """ if not isinstance(val, int): raise TypeError("expected an integer") - val = wasmtime_valunion_t(i64=val).i64 - return Val(WASMTIME_I64, val) + val = ffi.wasmtime_valunion_t(i64=val).i64 + return Val(ffi.WASMTIME_I64, val) @classmethod def f32(cls, val: float) -> "Val": @@ -68,8 +68,8 @@ def f32(cls, val: float) -> "Val": """ if not isinstance(val, float): raise TypeError("expected a float") - val = wasmtime_valunion_t(f32=val).f32 - return Val(WASMTIME_F32, val) + val = ffi.wasmtime_valunion_t(f32=val).f32 + return Val(ffi.WASMTIME_F32, val) @classmethod def f64(cls, val: float) -> "Val": @@ -78,16 +78,16 @@ def f64(cls, val: float) -> "Val": """ if not isinstance(val, float): raise TypeError("expected a float") - val = wasmtime_valunion_t(f64=val).f64 - return Val(WASMTIME_F64, val) + val = ffi.wasmtime_valunion_t(f64=val).f64 + return Val(ffi.WASMTIME_F64, val) @classmethod def externref(cls, extern: typing.Optional[typing.Any]) -> "Val": - return Val(WASMTIME_EXTERNREF, extern) + return Val(ffi.WASMTIME_EXTERNREF, extern) @classmethod def funcref(cls, f: "typing.Optional[wasmtime.Func]") -> "Val": - return Val(WASMTIME_FUNCREF, f) + return Val(ffi.WASMTIME_FUNCREF, f) @classmethod def ref_null(cls, ty: ValType) -> "Val": @@ -102,7 +102,7 @@ def ref_null(cls, ty: ValType) -> "Val": return Val.funcref(None) raise WasmtimeError("Invalid reference type for `ref_null`: %s" % ty) - def __init__(self, kind: wasmtime_valkind_t, val: typing.Any): + def __init__(self, kind: ffi.wasmtime_valkind_t, val: typing.Any): self._kind = kind self._val = val @@ -112,7 +112,7 @@ def __eq__(self, rhs: typing.Any) -> typing.Any: return self._val == rhs @classmethod - def _convert_to_raw(cls, store: 'Storelike', ty: ValType, val: Any) -> wasmtime_val_t: + def _convert_to_raw(cls, store: 'Storelike', ty: ValType, val: typing.Any) -> ffi.wasmtime_val_t: if isinstance(val, Val): if ty != val.type: raise TypeError("wrong type of `Val` provided") @@ -138,26 +138,26 @@ def _convert_to_raw(cls, store: 'Storelike', ty: ValType, val: Any) -> wasmtime_ return Val.funcref(None)._new_raw(store) raise TypeError("don't know how to convert %r to %s" % (val, ty)) - def _new_raw(self, store: 'Storelike') -> wasmtime_val_t: - ret = wasmtime_val_t(kind = self._kind) - if ret.kind == WASMTIME_I32.value: + def _new_raw(self, store: 'Storelike') -> ffi.wasmtime_val_t: + ret = ffi.wasmtime_val_t(kind = self._kind) + if ret.kind == ffi.WASMTIME_I32.value: ret.of.i32 = self._val - elif ret.kind == WASMTIME_I64.value: + elif ret.kind == ffi.WASMTIME_I64.value: ret.of.i64 = self._val - elif ret.kind == WASMTIME_F32.value: + elif ret.kind == ffi.WASMTIME_F32.value: ret.of.f32 = self._val - elif ret.kind == WASMTIME_F64.value: + elif ret.kind == ffi.WASMTIME_F64.value: ret.of.f64 = self._val - elif ret.kind == WASMTIME_EXTERNREF.value: + elif ret.kind == ffi.WASMTIME_EXTERNREF.value: if self._val is not None: extern_id = _intern(self._val) - if not wasmtime_externref_new(store._context(), extern_id, _externref_finalizer, - byref(ret.of.externref)): + if not ffi.wasmtime_externref_new(store._context(), extern_id, _externref_finalizer, + ctypes.byref(ret.of.externref)): raise WasmtimeError("failed to create an externref value") else: ret.of.externref.store_id = 0 - elif ret.kind == WASMTIME_FUNCREF.value: + elif ret.kind == ffi.WASMTIME_FUNCREF.value: if self._val is not None: ret.of.funcref = self._val._func else: @@ -165,28 +165,28 @@ def _new_raw(self, store: 'Storelike') -> wasmtime_val_t: return ret @classmethod - def _from_raw(cls, store: 'Storelike', raw: wasmtime_val_t, owned: bool = True) -> 'Val': + def _from_raw(cls, store: 'Storelike', raw: ffi.wasmtime_val_t, owned: bool = True) -> 'Val': val: typing.Any = None - if raw.kind == WASMTIME_I32.value: + if raw.kind == ffi.WASMTIME_I32.value: val = raw.of.i32 - elif raw.kind == WASMTIME_I64.value: + elif raw.kind == ffi.WASMTIME_I64.value: val = raw.of.i64 - elif raw.kind == WASMTIME_F32.value: + elif raw.kind == ffi.WASMTIME_F32.value: val = raw.of.f32 - elif raw.kind == WASMTIME_F64.value: + elif raw.kind == ffi.WASMTIME_F64.value: val = raw.of.f64 - elif raw.kind == WASMTIME_EXTERNREF.value: + elif raw.kind == ffi.WASMTIME_EXTERNREF.value: if raw.of.externref: - extern_id = wasmtime_externref_data(store._context(), raw.of.externref) + extern_id = ffi.wasmtime_externref_data(store._context(), raw.of.externref) val = _unintern(extern_id) - elif raw.kind == WASMTIME_FUNCREF.value: + elif raw.kind == ffi.WASMTIME_FUNCREF.value: if raw.of.funcref.store_id != 0: val = wasmtime.Func._from_raw(raw.of.funcref) else: - raise WasmtimeError("Unkown `wasmtime_valkind_t`: {}".format(raw.kind)) + raise WasmtimeError("Unkown `ffi.wasmtime_valkind_t`: {}".format(raw.kind)) if owned: - wasmtime_val_unroot(byref(raw)) + ffi.wasmtime_val_unroot(ctypes.byref(raw)) return Val(raw.kind, val) @@ -201,7 +201,7 @@ def as_i32(self) -> typing.Optional[int]: """ Get the 32-bit integer value of this value, or `None` if it's not an i32 """ - if self._kind == WASMTIME_I32: + if self._kind == ffi.WASMTIME_I32: assert(isinstance(self._val, int)) return self._val else: @@ -211,7 +211,7 @@ def as_i64(self) -> typing.Optional[int]: """ Get the 64-bit integer value of this value, or `None` if it's not an i64 """ - if self._kind == WASMTIME_I64: + if self._kind == ffi.WASMTIME_I64: assert(isinstance(self._val, int)) return self._val else: @@ -221,7 +221,7 @@ def as_f32(self) -> typing.Optional[float]: """ Get the 32-bit float value of this value, or `None` if it's not an f32 """ - if self._kind == WASMTIME_F32: + if self._kind == ffi.WASMTIME_F32: assert(isinstance(self._val, float)) return self._val else: @@ -231,7 +231,7 @@ def as_f64(self) -> typing.Optional[float]: """ Get the 64-bit float value of this value, or `None` if it's not an f64 """ - if self._kind == WASMTIME_F64: + if self._kind == ffi.WASMTIME_F64: assert(isinstance(self._val, float)) return self._val else: @@ -242,7 +242,7 @@ def as_externref(self) -> typing.Optional[typing.Any]: Get the extern data referenced by this `externref` value, or `None` if it's not an `externref`. """ - if self._kind == WASMTIME_EXTERNREF: + if self._kind == ffi.WASMTIME_EXTERNREF: return self._val else: return None @@ -252,7 +252,7 @@ def as_funcref(self) -> typing.Optional["wasmtime.Func"]: Get the function that this `funcref` value is referencing, or `None` if this is not a `funcref` value, or is a null reference. """ - if self._kind == WASMTIME_FUNCREF: + if self._kind == ffi.WASMTIME_FUNCREF: assert(isinstance(self._val, wasmtime.Func)) return self._val else: @@ -264,19 +264,19 @@ def type(self) -> ValType: Returns the `ValType` corresponding to this `Val` """ kind = self._kind - if kind == WASMTIME_I32: + if kind == ffi.WASMTIME_I32: return ValType.i32() - elif kind == WASMTIME_I64: + elif kind == ffi.WASMTIME_I64: return ValType.i64() - elif kind == WASMTIME_F32: + elif kind == ffi.WASMTIME_F32: return ValType.f32() - elif kind == WASMTIME_F64: + elif kind == ffi.WASMTIME_F64: return ValType.f64() - elif kind == WASMTIME_V128: + elif kind == ffi.WASMTIME_V128: raise Exception("unimplemented v128 type") - elif kind == WASMTIME_EXTERNREF: + elif kind == ffi.WASMTIME_EXTERNREF: return ValType.externref() - elif kind == WASMTIME_FUNCREF: + elif kind == ffi.WASMTIME_FUNCREF: return ValType.funcref() else: raise Exception("unknown kind %d" % kind.value) diff --git a/wasmtime/_wat2wasm.py b/wasmtime/_wat2wasm.py index 5733fa6f..abdd1104 100644 --- a/wasmtime/_wat2wasm.py +++ b/wasmtime/_wat2wasm.py @@ -1,5 +1,6 @@ +import ctypes + from . import _ffi as ffi -from ctypes import * from wasmtime import WasmtimeError import typing @@ -24,14 +25,14 @@ def wat2wasm(wat: typing.Union[str, bytes]) -> bytearray: if isinstance(wat, str): wat = wat.encode('utf8') - wat_buffer = create_string_buffer(wat) + wat_buffer = ctypes.create_string_buffer(wat) wasm = ffi.wasm_byte_vec_t() - error = ffi.wasmtime_wat2wasm(wat_buffer, len(wat), byref(wasm)) + error = ffi.wasmtime_wat2wasm(wat_buffer, len(wat), ctypes.byref(wasm)) if error: raise WasmtimeError._from_ptr(error) else: ret = ffi.to_bytes(wasm) - ffi.wasm_byte_vec_delete(byref(wasm)) + ffi.wasm_byte_vec_delete(ctypes.byref(wasm)) return ret def _to_wasm(wasm: typing.Union[str, bytes, bytearray]) -> typing.Union[bytes, bytearray]: diff --git a/wasmtime/component/_component.py b/wasmtime/component/_component.py index f21006bd..48d4a1d6 100644 --- a/wasmtime/component/_component.py +++ b/wasmtime/component/_component.py @@ -1,7 +1,6 @@ from .. import _ffi as ffi from .._wat2wasm import _to_wasm from ._types import ComponentType -from ctypes import * import ctypes from wasmtime import Engine, wat2wasm, WasmtimeError, Managed, Module import typing @@ -18,7 +17,7 @@ def _delete(self, ptr: "ctypes._Pointer[ffi.wasmtime_component_export_index_t]") @classmethod def _from_ptr(cls, ptr: "ctypes._Pointer[ffi.wasmtime_component_export_index_t]") -> "ExportIndex": - if not isinstance(ptr, POINTER(ffi.wasmtime_component_export_index_t)): + if not isinstance(ptr, ctypes.POINTER(ffi.wasmtime_component_export_index_t)): raise TypeError("wrong pointer type") ty: "ExportIndex" = cls.__new__(cls) ty._set_ptr(ptr) @@ -46,9 +45,9 @@ def __init__(self, engine: Engine, wasm: typing.Union[str, bytes, bytearray]): # TODO: can the copy be avoided here? I can't for the life of me # figure this out. - binary = (c_uint8 * len(wasm)).from_buffer_copy(wasm) - ptr = POINTER(ffi.wasmtime_component_t)() - error = ffi.wasmtime_component_new(engine.ptr(), binary, len(wasm), byref(ptr)) + binary = (ctypes.c_uint8 * len(wasm)).from_buffer_copy(wasm) + ptr = ctypes.POINTER(ffi.wasmtime_component_t)() + error = ffi.wasmtime_component_new(engine.ptr(), binary, len(wasm), ctypes.byref(ptr)) if error: raise WasmtimeError._from_ptr(error) self._set_ptr(ptr) @@ -58,7 +57,7 @@ def _delete(self, ptr: "ctypes._Pointer[ffi.wasmtime_component_t]") -> None: @classmethod def _from_ptr(cls, ptr: "ctypes._Pointer[ffi.wasmtime_component_t]") -> "Component": - if not isinstance(ptr, POINTER(ffi.wasmtime_component_t)): + if not isinstance(ptr, ctypes.POINTER(ffi.wasmtime_component_t)): raise TypeError("wrong pointer type") ty: "Component" = cls.__new__(cls) ty._set_ptr(ptr) @@ -78,15 +77,15 @@ def deserialize(cls, engine: Engine, encoded: typing.Union[bytes, bytearray]) -> if not isinstance(encoded, (bytes, bytearray)): raise TypeError("expected bytes") - ptr = POINTER(ffi.wasmtime_component_t)() + ptr = ctypes.POINTER(ffi.wasmtime_component_t)() # TODO: can the copy be avoided here? I can't for the life of me # figure this out. error = ffi.wasmtime_component_deserialize( engine.ptr(), - (c_uint8 * len(encoded)).from_buffer_copy(encoded), + (ctypes.c_uint8 * len(encoded)).from_buffer_copy(encoded), len(encoded), - byref(ptr)) + ctypes.byref(ptr)) if error: raise WasmtimeError._from_ptr(error) return cls._from_ptr(ptr) @@ -100,12 +99,12 @@ def deserialize_file(cls, engine: Engine, path: str) -> 'Component': Otherwise this function is the same as `Component.deserialize`. """ - ptr = POINTER(ffi.wasmtime_component_t)() + ptr = ctypes.POINTER(ffi.wasmtime_component_t)() path_bytes = path.encode('utf-8') error = ffi.wasmtime_component_deserialize_file( engine.ptr(), path_bytes, - byref(ptr)) + ctypes.byref(ptr)) if error: raise WasmtimeError._from_ptr(error) return cls._from_ptr(ptr) @@ -119,11 +118,11 @@ def serialize(self) -> bytearray: recreate this component. """ raw = ffi.wasm_byte_vec_t() - err = ffi.wasmtime_component_serialize(self.ptr(), byref(raw)) + err = ffi.wasmtime_component_serialize(self.ptr(), ctypes.byref(raw)) if err: raise WasmtimeError._from_ptr(err) ret = ffi.to_bytes(raw) - ffi.wasm_byte_vec_delete(byref(raw)) + ffi.wasm_byte_vec_delete(ctypes.byref(raw)) return ret def get_export_index(self, name: str, instance : typing.Optional[ExportIndex] = None) -> typing.Optional[ExportIndex]: @@ -136,7 +135,7 @@ def get_export_index(self, name: str, instance : typing.Optional[ExportIndex] = instance for example. """ name_bytes = name.encode('utf-8') - name_buf = create_string_buffer(name_bytes) + name_buf = ctypes.create_string_buffer(name_bytes) ret = ffi.wasmtime_component_get_export_index( self.ptr(), instance.ptr() if instance is not None else None, diff --git a/wasmtime/component/_instance.py b/wasmtime/component/_instance.py index 036f77ab..4d3537ab 100644 --- a/wasmtime/component/_instance.py +++ b/wasmtime/component/_instance.py @@ -1,3 +1,5 @@ +import ctypes + from .. import _ffi as ffi, WasmtimeError, Storelike from ctypes import byref from typing import Optional, Union @@ -29,7 +31,7 @@ def get_export_index(self, store: Storelike, name: str, instance: Optional[Expor index. """ name_bytes = name.encode('utf-8') - name_buf = ffi.create_string_buffer(name_bytes) + name_buf = ctypes.create_string_buffer(name_bytes) ptr = ffi.wasmtime_component_instance_get_export_index( byref(self._instance), From a5c7f6c35de0e8b78661ee324bde46350df7ba2a Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Sat, 8 Nov 2025 18:36:02 +0000 Subject: [PATCH 2/2] Work around type mismatches of wasmtime._value._unintern() refs #303 --- wasmtime/_store.py | 3 ++- wasmtime/_value.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wasmtime/_store.py b/wasmtime/_store.py index 7fd34463..2807ffdd 100644 --- a/wasmtime/_store.py +++ b/wasmtime/_store.py @@ -42,7 +42,8 @@ def data(self) -> typing.Optional[typing.Any]: """ data = ffi.wasmtime_context_get_data(self._context()) if data: - return value._unintern(data) + # FIXME https://github.com/bytecodealliance/wasmtime-py/issues/303 + return value._unintern(data) # type: ignore else: return None diff --git a/wasmtime/_value.py b/wasmtime/_value.py index 00aa6cf5..941c2b54 100644 --- a/wasmtime/_value.py +++ b/wasmtime/_value.py @@ -178,7 +178,8 @@ def _from_raw(cls, store: 'Storelike', raw: ffi.wasmtime_val_t, owned: bool = Tr elif raw.kind == ffi.WASMTIME_EXTERNREF.value: if raw.of.externref: extern_id = ffi.wasmtime_externref_data(store._context(), raw.of.externref) - val = _unintern(extern_id) + # FIXME https://github.com/bytecodealliance/wasmtime-py/issues/303 + val = _unintern(extern_id) # type: ignore elif raw.kind == ffi.WASMTIME_FUNCREF.value: if raw.of.funcref.store_id != 0: val = wasmtime.Func._from_raw(raw.of.funcref)