@@ -156,7 +156,7 @@ pub use libloading::{Library, Symbol};
156
156
/// ```
157
157
#[ macro_export]
158
158
macro_rules! ffi_dispatch(
159
- ( feature=$feature: expr, $handle: ident , $func: ident, $( $arg: expr) ,* ) => (
159
+ ( feature=$feature: expr, $handle: expr , $func: ident, $( $arg: expr) ,* ) => (
160
160
{
161
161
#[ cfg( feature = $feature) ]
162
162
let ret = ( $handle. $func) ( $( $arg) ,* ) ;
@@ -166,7 +166,7 @@ macro_rules! ffi_dispatch(
166
166
ret
167
167
}
168
168
) ;
169
- ( $handle: ident , $func: ident, $( $arg: expr) ,* ) => (
169
+ ( $handle: expr , $func: ident, $( $arg: expr) ,* ) => (
170
170
// NOTE: this "dlopen" refers to a feature on the crate *using* dlib
171
171
$crate:: ffi_dispatch!( feature="dlopen" , $handle, $func, $( $arg) ,* )
172
172
) ;
@@ -190,7 +190,7 @@ macro_rules! ffi_dispatch(
190
190
/// ```
191
191
#[ macro_export]
192
192
macro_rules! ffi_dispatch_static(
193
- ( feature=$feature: expr, $handle: ident , $name: ident) => (
193
+ ( feature=$feature: expr, $handle: expr , $name: ident) => (
194
194
{
195
195
#[ cfg( feature = $feature) ]
196
196
let ret = $handle. $name;
@@ -200,7 +200,7 @@ macro_rules! ffi_dispatch_static(
200
200
ret
201
201
}
202
202
) ;
203
- ( $handle: ident , $name: ident) => (
203
+ ( $handle: expr , $name: ident) => (
204
204
$crate:: ffi_dispatch_static!( feature="dlopen" , $handle, $name)
205
205
) ;
206
206
) ;
0 commit comments