Use cstr-macro crate

This commit is contained in:
Godfrey Chan 2017-09-11 00:43:30 -07:00
parent 2864f15db3
commit 856244698f
4 changed files with 9 additions and 10 deletions

View File

@ -37,4 +37,4 @@ ruby! {
throw!("Aaaaahhhhh!!!!!");
}
}
}
}

View File

@ -1,5 +1,12 @@
extern crate cslice;
#[allow(unused_imports)]
#[macro_use]
extern crate cstr_macro;
#[doc(hidden)]
pub use cstr_macro::*;
#[doc(hidden)]
pub extern crate libc;

View File

@ -206,4 +206,4 @@ macro_rules! codegen_extra_impls {
codegen_allocator!($class);
codegen_coercions!($class);
)
}
}

View File

@ -313,14 +313,6 @@ macro_rules! replace_expr {
($_t:tt $sub:expr) => {$sub};
}
#[doc(hidden)]
#[macro_export]
macro_rules! cstr {
($s:expr) => (
concat!($s, "\0") as *const str as *const [::std::os::raw::c_char] as *const ::std::os::raw::c_char
)
}
#[macro_export]
macro_rules! handle_exception {
{ $($body:tt)* } => {