Use multiple renames to simplify plugins.

This commit is contained in:
Stephen Chung
2020-09-08 18:01:34 +08:00
parent 38ccb9e8f6
commit d41fde9c31
7 changed files with 25 additions and 84 deletions

View File

@@ -8,14 +8,9 @@ def_package!(crate:BasicFnPackage:"Basic Fn functions.", lib, {
#[export_module]
mod fn_ptr_functions {
#[rhai_fn(name = "name", get = "name")]
#[inline(always)]
pub fn name(f: &mut FnPtr) -> ImmutableString {
f.get_fn_name().clone()
}
#[rhai_fn(get = "name")]
#[inline(always)]
pub fn name_prop(f: &mut FnPtr) -> ImmutableString {
name(f)
}
}