Skip to content

Commit b1d8ff5

Browse files
authored
update ffi.rs (#2363)
I forgot to do this as part of #2362 🤦 Signed-off-by: Joel Dice <[email protected]>
1 parent 65e5924 commit b1d8ff5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/wit-dylib/ffi/src/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub const WIT_TYPE_FUTURE: u32 = 25;
2929
pub const WIT_TYPE_STREAM: u32 = 26;
3030
pub const WIT_TYPE_ALIAS: u32 = 27;
3131
pub const WIT_TYPE_EMPTY: u32 = 255;
32-
pub const WIT_V0: u32 = 0;
32+
pub const WIT_CURRENT_VERSION: u32 = 1;
3333
pub type wit_type_t = u32;
3434
pub type wit_import_fn_t =
3535
::std::option::Option<unsafe extern "C" fn(cx: *mut ::std::os::raw::c_void)>;

crates/wit-dylib/ffi/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl_extra_traits!(Wit);
3434
impl Wit {
3535
pub(crate) unsafe fn from_raw(ptr: *const ffi::wit_t) -> Wit {
3636
unsafe {
37-
assert!((*ptr).version >= ffi::WIT_V0);
37+
assert!((*ptr).version >= ffi::WIT_CURRENT_VERSION);
3838
Wit {
3939
ptr: ptr.as_ref().unwrap(),
4040
}

0 commit comments

Comments
 (0)