Skip to content

Commit b431964

Browse files
committed
fix: FFI types on Windows
1 parent 32b02b6 commit b431964

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

simplicity-sys/src/ffi.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ pub type c_int = i32;
1919
pub type c_uint = u32;
2020
pub type c_size_t = usize;
2121
pub type c_uint_fast8_t = u8;
22-
#[cfg(any(target_arch = "wasm32", target_arch = "aarch64"))]
22+
#[cfg(all(
23+
any(target_arch = "wasm32", target_arch = "aarch64"),
24+
not(target_os = "windows")
25+
))]
2326
pub type c_uint_fast16_t = u16;
24-
#[cfg(not(any(target_arch = "wasm32", target_arch = "aarch64")))]
27+
#[cfg(target_os = "windows")]
28+
pub type c_uint_fast16_t = u32;
29+
#[cfg(not(any(target_arch = "wasm32", target_arch = "aarch64", target_os = "windows")))]
2530
pub type c_uint_fast16_t = usize;
26-
#[cfg(any(target_arch = "wasm32", target_arch = "aarch64"))]
31+
#[cfg(any(target_arch = "wasm32", target_arch = "aarch64", target_os = "windows"))]
2732
pub type c_uint_fast32_t = u32;
28-
#[cfg(not(any(target_arch = "wasm32", target_arch = "aarch64")))]
33+
#[cfg(not(any(target_arch = "wasm32", target_arch = "aarch64", target_os = "windows")))]
2934
pub type c_uint_fast32_t = usize;
3035
#[cfg(target_arch = "wasm32")]
3136
pub type c_uint_fast64_t = u64;

0 commit comments

Comments
 (0)