Merge remote-tracking branch 'schungx/closures' into closures
This commit is contained in:
@@ -137,13 +137,13 @@ impl FnPtr {
|
||||
&mut Default::default(),
|
||||
lib.as_ref(),
|
||||
fn_name,
|
||||
false,
|
||||
hash_script,
|
||||
args.as_mut(),
|
||||
has_this,
|
||||
has_this,
|
||||
true,
|
||||
None,
|
||||
None,
|
||||
0,
|
||||
)
|
||||
.map(|(v, _)| v)
|
||||
@@ -287,6 +287,16 @@ impl CallableFunction {
|
||||
Self::Pure(_) | Self::Method(_) | Self::Iterator(_) => false,
|
||||
}
|
||||
}
|
||||
/// Is this a native Rust function?
|
||||
pub fn is_native(&self) -> bool {
|
||||
match self {
|
||||
Self::Pure(_) | Self::Method(_) => true,
|
||||
Self::Iterator(_) => true,
|
||||
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
Self::Script(_) => false,
|
||||
}
|
||||
}
|
||||
/// Get the access mode.
|
||||
pub fn access(&self) -> FnAccess {
|
||||
match self {
|
||||
|
Reference in New Issue
Block a user