diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67bf2ad..d220307 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ before_script: test: stage: test script: - - cargo test + - cargo test --no-default-features --features 0_10 publish: stage: publish diff --git a/speech-dispatcher/Cargo.toml b/speech-dispatcher/Cargo.toml index 433dcf0..4fc2bec 100644 --- a/speech-dispatcher/Cargo.toml +++ b/speech-dispatcher/Cargo.toml @@ -8,9 +8,9 @@ license = "LGPL-2.1 OR MIT OR Apache-2.0" edition = "2021" [features] -0_10_2 = ["0_10"] +0_11 = ["0_10"] 0_10 = [] -default = ["0_10_2"] +default = ["0_11"] [dependencies] lazy_static = "1" diff --git a/speech-dispatcher/src/lib.rs b/speech-dispatcher/src/lib.rs index d8b5697..9c97c00 100644 --- a/speech-dispatcher/src/lib.rs +++ b/speech-dispatcher/src/lib.rs @@ -413,26 +413,26 @@ impl Connection { } pub fn set_voice_type(&self, voice_type: VoiceType) -> Result<(), Error> { - #[cfg(all(feature = "0_10", not(feature = "0_10_2")))] - let v = unsafe { spd_set_voice_type(*self.0, voice_type as i32) }; - #[cfg(any(feature = "0_10_2", not(feature = "0_10")))] + #[cfg(all(feature = "0_10", not(feature = "0_11")))] let v = unsafe { spd_set_voice_type(*self.0, voice_type as u32) }; + #[cfg(any(feature = "0_11", not(feature = "0_10")))] + let v = unsafe { spd_set_voice_type(*self.0, voice_type as i32) }; c_int_to_result(v) } pub fn set_voice_type_all(&self, voice_type: VoiceType) -> Result<(), Error> { - #[cfg(all(feature = "0_10", not(feature = "0_10_2")))] - let v = unsafe { spd_set_voice_type_all(*self.0, voice_type as i32) }; - #[cfg(any(feature = "0_10_2", not(feature = "0_10")))] + #[cfg(all(feature = "0_10", not(feature = "0_11")))] let v = unsafe { spd_set_voice_type_all(*self.0, voice_type as u32) }; + #[cfg(any(feature = "0_11", not(feature = "0_10")))] + let v = unsafe { spd_set_voice_type_all(*self.0, voice_type as i32) }; c_int_to_result(v) } pub fn set_voice_type_uid(&self, voice_type: VoiceType, target_uid: u32) -> Result<(), Error> { - #[cfg(all(feature = "0_10", not(feature = "0_10_2")))] - let v = unsafe { spd_set_voice_type_uid(*self.0, voice_type as i32, target_uid) }; - #[cfg(any(feature = "0_10_2", not(feature = "0_10")))] + #[cfg(all(feature = "0_10", not(feature = "0_11")))] let v = unsafe { spd_set_voice_type_uid(*self.0, voice_type as u32, target_uid) }; + #[cfg(any(feature = "0_11", not(feature = "0_10")))] + let v = unsafe { spd_set_voice_type_uid(*self.0, voice_type as i32, target_uid) }; c_int_to_result(v) }