Skip to content

Commit 4126e2e

Browse files
committed
fix ffi for platform-specific uint_fast types for macOS and Android
1 parent 935a0ab commit 4126e2e

1 file changed

Lines changed: 26 additions & 8 deletions

File tree

simplicity-sys/src/ffi.rs

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,36 @@ 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(all(
23-
any(target_arch = "wasm32", target_arch = "aarch64"),
24-
not(target_os = "windows")
25-
))]
22+
#[cfg(any(target_os = "macos", target_os = "ios"))]
2623
pub type c_uint_fast16_t = u16;
27-
#[cfg(target_os = "windows")]
24+
#[cfg(any(target_os = "windows", target_os = "android"))]
2825
pub type c_uint_fast16_t = u32;
29-
#[cfg(not(any(target_arch = "wasm32", target_arch = "aarch64", target_os = "windows")))]
26+
#[cfg(target_arch = "wasm32")]
27+
pub type c_uint_fast16_t = u16;
28+
#[cfg(not(any(
29+
target_os = "macos",
30+
target_os = "ios",
31+
target_os = "windows",
32+
target_os = "android",
33+
target_arch = "wasm32"
34+
)))]
3035
pub type c_uint_fast16_t = usize;
31-
#[cfg(any(target_arch = "wasm32", target_arch = "aarch64", target_os = "windows"))]
36+
37+
#[cfg(any(
38+
target_os = "macos",
39+
target_os = "ios",
40+
target_os = "windows",
41+
target_os = "android",
42+
target_arch = "wasm32"
43+
))]
3244
pub type c_uint_fast32_t = u32;
33-
#[cfg(not(any(target_arch = "wasm32", target_arch = "aarch64", target_os = "windows")))]
45+
#[cfg(not(any(
46+
target_os = "macos",
47+
target_os = "ios",
48+
target_os = "windows",
49+
target_os = "android",
50+
target_arch = "wasm32"
51+
)))]
3452
pub type c_uint_fast32_t = usize;
3553
#[cfg(target_arch = "wasm32")]
3654
pub type c_uint_fast64_t = u64;

0 commit comments

Comments
 (0)