global_module -> global_namespace.

This commit is contained in:
Stephen Chung
2020-11-19 13:56:03 +08:00
parent a00d6ba99e
commit 5e4ede6f07
4 changed files with 20 additions and 15 deletions

View File

@@ -56,8 +56,13 @@ impl Engine {
+ SendSync
+ 'static,
) -> &mut Self {
self.global_module
.set_raw_fn(name, FnNamespace::Global, FnAccess::Public, arg_types, func);
self.global_namespace.set_raw_fn(
name,
FnNamespace::Global,
FnAccess::Public,
arg_types,
func,
);
self
}
/// Register a custom type for use with the `Engine`.
@@ -159,7 +164,7 @@ impl Engine {
T: Variant + Clone + Iterator,
<T as Iterator>::Item: Variant + Clone,
{
self.global_module.set_iterable::<T>();
self.global_namespace.set_iterable::<T>();
self
}
/// Register a getter function for a member of a registered type with the `Engine`.