Deprecate Module::set_fn_XXX API.

This commit is contained in:
Stephen Chung
2021-03-15 12:39:06 +08:00
parent d0922adb5b
commit e9f280f917
9 changed files with 169 additions and 514 deletions

View File

@@ -75,7 +75,7 @@ fn test_functions_namespaces() -> Result<(), Box<EvalAltResult>> {
#[cfg(not(feature = "no_module"))]
{
let mut m = Module::new();
let hash = m.set_fn_0("test", || Ok(999 as INT));
let hash = m.set_native_fn("test", || Ok(999 as INT));
m.update_fn_namespace(hash, FnNamespace::Global);
engine.register_static_module("hello", m.into());