Remove Module::get_script_function_by_signature.

This commit is contained in:
Stephen Chung
2020-10-05 18:07:40 +08:00
parent 82d48df734
commit 2f6bb643aa
3 changed files with 2 additions and 20 deletions

View File

@@ -1103,24 +1103,6 @@ impl Module {
}
}
/// Get a script-defined function definition from a module.
#[cfg(not(feature = "no_function"))]
pub fn get_script_function_by_signature(
&self,
name: &str,
num_params: usize,
pub_only: bool,
) -> Option<&ScriptFnDef> {
// Qualifiers (none) + function name + number of arguments.
let hash_script = calc_fn_hash(empty(), name, num_params, empty());
let func = self.get_fn(hash_script, pub_only)?;
if func.is_script() {
Some(func.get_fn_def())
} else {
None
}
}
/// Get a modules-qualified function.
/// Name and Position in `EvalAltResult` are None and must be set afterwards.
///