Skip to content

Commit 8702823

Browse files
authored
Bump to 0.39.1 (#90)
* Bump to 0.39.1 * Update bindings for 0.39.0 * Ignore type errors I don't know how to fix
1 parent 58f41ef commit 8702823

File tree

8 files changed

+17
-21
lines changed

8 files changed

+17
-21
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.38.0
1+
0.39.1

wasmtime/_bindings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,9 +2042,9 @@ def wasmtime_config_wasm_memory64_set(arg0: Any, arg1: Any) -> None:
20422042
return _wasmtime_config_wasm_memory64_set(arg0, arg1) # type: ignore
20432043

20442044
_wasmtime_config_strategy_set = dll.wasmtime_config_strategy_set
2045-
_wasmtime_config_strategy_set.restype = POINTER(wasmtime_error_t)
2045+
_wasmtime_config_strategy_set.restype = None
20462046
_wasmtime_config_strategy_set.argtypes = [POINTER(wasm_config_t), wasmtime_strategy_t]
2047-
def wasmtime_config_strategy_set(arg0: Any, arg1: Any) -> pointer:
2047+
def wasmtime_config_strategy_set(arg0: Any, arg1: Any) -> None:
20482048
return _wasmtime_config_strategy_set(arg0, arg1) # type: ignore
20492049

20502050
_wasmtime_config_cranelift_debug_verifier_set = dll.wasmtime_config_cranelift_debug_verifier_set
@@ -2066,9 +2066,9 @@ def wasmtime_config_cranelift_opt_level_set(arg0: Any, arg1: Any) -> None:
20662066
return _wasmtime_config_cranelift_opt_level_set(arg0, arg1) # type: ignore
20672067

20682068
_wasmtime_config_profiler_set = dll.wasmtime_config_profiler_set
2069-
_wasmtime_config_profiler_set.restype = POINTER(wasmtime_error_t)
2069+
_wasmtime_config_profiler_set.restype = None
20702070
_wasmtime_config_profiler_set.argtypes = [POINTER(wasm_config_t), wasmtime_profiling_strategy_t]
2071-
def wasmtime_config_profiler_set(arg0: Any, arg1: Any) -> pointer:
2071+
def wasmtime_config_profiler_set(arg0: Any, arg1: Any) -> None:
20722072
return _wasmtime_config_profiler_set(arg0, arg1) # type: ignore
20732073

20742074
_wasmtime_config_static_memory_maximum_size_set = dll.wasmtime_config_static_memory_maximum_size_set

wasmtime/_config.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,11 @@ def strategy(self, strategy: str) -> None:
130130
"""
131131

132132
if strategy == "auto":
133-
error = ffi.wasmtime_config_strategy_set(self._ptr, 0)
133+
ffi.wasmtime_config_strategy_set(self._ptr, 0)
134134
elif strategy == "cranelift":
135-
error = ffi.wasmtime_config_strategy_set(self._ptr, 1)
135+
ffi.wasmtime_config_strategy_set(self._ptr, 1)
136136
else:
137137
raise WasmtimeError("unknown strategy: " + str(strategy))
138-
if error:
139-
raise WasmtimeError._from_ptr(error)
140138

141139
@setter_property
142140
def cranelift_debug_verifier(self, enable: bool) -> None:
@@ -158,13 +156,11 @@ def cranelift_opt_level(self, opt_level: str) -> None:
158156
@setter_property
159157
def profiler(self, profiler: str) -> None:
160158
if profiler == "none":
161-
error = ffi.wasmtime_config_profiler_set(self._ptr, 0)
159+
ffi.wasmtime_config_profiler_set(self._ptr, 0)
162160
elif profiler == "jitdump":
163-
error = ffi.wasmtime_config_profiler_set(self._ptr, 1)
161+
ffi.wasmtime_config_profiler_set(self._ptr, 1)
164162
else:
165163
raise WasmtimeError("unknown profiler: " + str(profiler))
166-
if error:
167-
raise WasmtimeError._from_ptr(error)
168164

169165
@setter_property
170166
def cache(self, enabled: typing.Union[bool, str]) -> None:

wasmtime/_func.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def deallocate(self, idx: int) -> None:
255255
@contextmanager
256256
def enter_wasm(store: Storelike): # type: ignore
257257
try:
258-
trap = POINTER(ffi.wasm_trap_t)()
258+
trap = POINTER(ffi.wasm_trap_t)() # type: ignore
259259
yield byref(trap)
260260
if trap:
261261
trap_obj = Trap._from_ptr(trap)

wasmtime/_instance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, store: Storelike, module: Module, imports: Sequence[AsExtern]
3030
imports_ptr[i] = get_extern_ptr(val)
3131

3232
instance = ffi.wasmtime_instance_t()
33-
trap = POINTER(ffi.wasm_trap_t)()
33+
trap = POINTER(ffi.wasm_trap_t)() # type: ignore
3434
with enter_wasm(store) as trap:
3535
error = ffi.wasmtime_instance_new(
3636
store._context,
@@ -77,7 +77,7 @@ def __init__(self, store: Storelike, instance: Instance):
7777

7878
i = 0
7979
item = ffi.wasmtime_extern_t()
80-
name_ptr = POINTER(ffi.c_char)()
80+
name_ptr = POINTER(ffi.c_char)() # type: ignore
8181
name_len = ffi.c_size_t(0)
8282
while ffi.wasmtime_instance_export_nth(
8383
store._context,

wasmtime/_linker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def instantiate(self, store: Storelike, module: Module) -> Instance:
156156
Raises an error if an import of `module` hasn't been defined in this
157157
linker or if a trap happens while instantiating the instance.
158158
"""
159-
trap = POINTER(ffi.wasm_trap_t)()
159+
trap = POINTER(ffi.wasm_trap_t)() # type: ignore
160160
instance = ffi.wasmtime_instance_t()
161161
with enter_wasm(store) as trap:
162162
error = ffi.wasmtime_linker_instantiate(

wasmtime/_module.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, engine: Engine, wasm: typing.Union[str, bytes]):
3535
# TODO: can the copy be avoided here? I can't for the life of me
3636
# figure this out.
3737
binary = (c_uint8 * len(wasm)).from_buffer_copy(wasm)
38-
ptr = POINTER(ffi.wasmtime_module_t)()
38+
ptr = POINTER(ffi.wasmtime_module_t)() # type: ignore
3939
error = ffi.wasmtime_module_new(engine._ptr, binary, len(wasm), byref(ptr))
4040
if error:
4141
raise WasmtimeError._from_ptr(error)
@@ -63,7 +63,7 @@ def deserialize(cls, engine: Engine, encoded: typing.Union[bytes, bytearray]) ->
6363
if not isinstance(encoded, (bytes, bytearray)):
6464
raise TypeError("expected bytes")
6565

66-
ptr = POINTER(ffi.wasmtime_module_t)()
66+
ptr = POINTER(ffi.wasmtime_module_t)() # type: ignore
6767

6868
# TODO: can the copy be avoided here? I can't for the life of me
6969
# figure this out.
@@ -87,7 +87,7 @@ def deserialize_file(cls, engine: Engine, path: str) -> 'Module':
8787
Otherwise this function is the same as `Module.deserialize`.
8888
"""
8989

90-
ptr = POINTER(ffi.wasmtime_module_t)()
90+
ptr = POINTER(ffi.wasmtime_module_t)() # type: ignore
9191
path_bytes = path.encode('utf-8')
9292
error = ffi.wasmtime_module_deserialize_file(
9393
engine._ptr,

wasmtime/_value.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def f64(cls, val: float) -> "Val":
7979
@classmethod
8080
def externref(cls, extern: typing.Optional[typing.Any]) -> "Val":
8181
ffi = wasmtime_val_t(WASMTIME_EXTERNREF)
82-
ffi.of.externref = POINTER(wasmtime_externref_t)()
82+
ffi.of.externref = POINTER(wasmtime_externref_t)() # type: ignore
8383
if extern is not None:
8484
extern_id = _intern(extern)
8585
ptr = wasmtime_externref_new(extern_id, _externref_finalizer)

0 commit comments

Comments
 (0)