Fix Windows being special again

This commit is contained in:
Niko 2025-02-10 14:14:20 -07:00
parent e989dead0f
commit 03351b5f9c
No known key found for this signature in database

View file

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