This commit is contained in:
Intege-rs
2024-11-15 10:28:09 -05:00
parent 020bd3a5db
commit bf68dfc364

View File

@@ -15,10 +15,10 @@ pub macro cstr($str:expr) {
/// | ```cfn!( (usize) -> usize )``` | ``` extern "C" fn(usize) -> usize``` |
/// | ```cfn!( (usize) )``` | ``` extern "C" fn(usize)``` |
/// | ```cfn!( (u32, usize, usize) -> u32 )``` | ``` extern "C" fn(u32, usize, usize) -> u32``` |
pub macro cfn($str:expr) {
pub macro cfn {
( ($($t:ty),*)) => {
extern "C" fn($( $t ),* )
};
},
( ($($t:ty),*) -> $r:ty) => {
extern "C" fn($( $t ),* ) -> $r
}