Add alias to bindings::MagickBoolean_*

Reduces the amount of repetitive `bindingc::MagickBoolean_*` in wrapper
code
This commit is contained in:
5ohue
2024-05-11 13:57:29 +03:00
parent cac32a9760
commit eb982bbf1d
6 changed files with 79 additions and 78 deletions

View File

@ -130,10 +130,10 @@ macro_rules! set_get_unchecked {
($($get:ident, $set:ident, $c_get:ident, $c_set:ident, $typ:ty )*) => {
$(
pub fn $get(&self) -> $typ {
unsafe { ::bindings::$c_get(self.wand) }
unsafe { ::bindings::$c_get(self.wand).into() }
}
pub fn $set(&mut self, v: $typ) {
unsafe { ::bindings::$c_set(self.wand, v) }
unsafe { ::bindings::$c_set(self.wand, v.into()) }
}
)*
pub fn fmt_unchecked_settings(&self, f: &mut ::std::fmt::Formatter, prefix: &str) -> ::std::fmt::Result {