Use the rust-bindgen crate properly
Using the changes from @gadomski along with some additional work, to get the generated bindings working again. Works on macOS and FreeBSD 11. A couple of hacks are needed for FreeBSD, but nothing too serious. Changed to use the libc prefix, and changed to use the generated enums. Fixes #22, #15, and #14 cargo test passes
This commit is contained in:
@ -22,9 +22,9 @@ pub trait FromRust<T> {
|
||||
impl FromRust<bool> for bindings::MagickBooleanType {
|
||||
fn from_rust(b: bool) -> Self {
|
||||
if b {
|
||||
bindings::MagickTrue
|
||||
bindings::MagickBooleanType::MagickTrue
|
||||
} else {
|
||||
bindings::MagickFalse
|
||||
bindings::MagickBooleanType::MagickFalse
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user