summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/ffi/dlfcn.rs8
-rw-r--r--ext/ffi/symbol.rs1
-rw-r--r--ext/ffi/turbocall.rs4
3 files changed, 1 insertions, 12 deletions
diff --git a/ext/ffi/dlfcn.rs b/ext/ffi/dlfcn.rs
index 02ab4bb6a..2bc9ab341 100644
--- a/ext/ffi/dlfcn.rs
+++ b/ext/ffi/dlfcn.rs
@@ -60,18 +60,11 @@ pub struct ForeignFunction {
pub result: NativeType,
#[serde(rename = "nonblocking")]
non_blocking: Option<bool>,
- #[serde(rename = "callback")]
- #[serde(default = "default_callback")]
- callback: bool,
#[serde(rename = "optional")]
#[serde(default = "default_optional")]
optional: bool,
}
-fn default_callback() -> bool {
- false
-}
-
fn default_optional() -> bool {
false
}
@@ -191,7 +184,6 @@ where
ptr,
parameter_types: foreign_fn.parameters,
result_type: foreign_fn.result,
- can_callback: foreign_fn.callback,
});
resource.symbols.insert(symbol_key, sym.clone());
diff --git a/ext/ffi/symbol.rs b/ext/ffi/symbol.rs
index 24ce85377..cee1c7d33 100644
--- a/ext/ffi/symbol.rs
+++ b/ext/ffi/symbol.rs
@@ -70,7 +70,6 @@ pub struct Symbol {
pub ptr: libffi::middle::CodePtr,
pub parameter_types: Vec<NativeType>,
pub result_type: NativeType,
- pub can_callback: bool,
}
#[allow(clippy::non_send_fields_in_send_ty)]
diff --git a/ext/ffi/turbocall.rs b/ext/ffi/turbocall.rs
index 204388946..b1cd5177b 100644
--- a/ext/ffi/turbocall.rs
+++ b/ext/ffi/turbocall.rs
@@ -18,8 +18,7 @@ pub(crate) fn is_compatible(sym: &Symbol) -> bool {
all(target_arch = "x86_64", target_family = "unix"),
all(target_arch = "x86_64", target_family = "windows"),
all(target_arch = "aarch64", target_vendor = "apple")
- )) && !sym.can_callback
- && !matches!(sym.result_type, NativeType::Struct(_))
+ )) && !matches!(sym.result_type, NativeType::Struct(_))
&& !sym
.parameter_types
.iter()
@@ -1437,7 +1436,6 @@ mod tests {
ptr: libffi::middle::CodePtr(null_mut()),
parameter_types: parameters,
result_type: ret,
- can_callback: false,
}
}