Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 03351b5

Browse files
committed
Fix Windows being special again
1 parent e989dea commit 03351b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/common_logging.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ pub(crate) use {generic_debug, generic_error, generic_info, generic_trace, gener
4848

4949
// Unsigned integer type on most platforms is 32 bit, niche platforms that whisper.cpp
5050
// likely doesn't even support would use 16 bit and would still fit
51-
#[repr(u32)]
51+
#[cfg_attr(any(not(windows), target_env = "gnu"), repr(u32))]
52+
// Of course Windows thinks it's a special little shit and
53+
// picks a signed integer for an unsigned type
54+
#[cfg_attr(all(windows, not(target_env = "gnu")), repr(i32))]
5255
pub(crate) enum GGMLLogLevel {
5356
None = whisper_rs_sys::ggml_log_level_GGML_LOG_LEVEL_NONE,
5457
Info = whisper_rs_sys::ggml_log_level_GGML_LOG_LEVEL_INFO,

0 commit comments

Comments
 (0)