Use combine_flatten for plugin modules.
This commit is contained in:
@@ -59,7 +59,7 @@ macro_rules! reg_pad {
|
||||
}
|
||||
|
||||
def_package!(crate:BasicArrayPackage:"Basic array utilities.", lib, {
|
||||
lib.combine(exported_module!(array_functions));
|
||||
lib.combine_flatten(exported_module!(array_functions));
|
||||
|
||||
reg_functions!(lib += basic; INT, bool, char, ImmutableString, FnPtr, Array, Unit);
|
||||
reg_pad!(lib, INT, bool, char, ImmutableString, FnPtr, Array, Unit);
|
||||
|
@@ -3,7 +3,7 @@ use crate::fn_native::FnPtr;
|
||||
use crate::plugin::*;
|
||||
|
||||
def_package!(crate:BasicFnPackage:"Basic Fn functions.", lib, {
|
||||
lib.combine(exported_module!(fn_ptr_functions));
|
||||
lib.combine_flatten(exported_module!(fn_ptr_functions));
|
||||
});
|
||||
|
||||
#[export_module]
|
||||
|
@@ -47,7 +47,7 @@ macro_rules! gen_cmp_functions {
|
||||
|
||||
macro_rules! reg_functions {
|
||||
($mod_name:ident += $root:ident ; $($arg_type:ident),+) => {
|
||||
$($mod_name.combine(exported_module!($root::$arg_type::functions));)*
|
||||
$($mod_name.combine_flatten(exported_module!($root::$arg_type::functions));)*
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -9,11 +9,11 @@ use crate::plugin::*;
|
||||
use crate::stdlib::vec::Vec;
|
||||
|
||||
def_package!(crate:BasicMapPackage:"Basic object map utilities.", lib, {
|
||||
lib.combine(exported_module!(map_functions));
|
||||
lib.combine_flatten(exported_module!(map_functions));
|
||||
|
||||
// Register map access functions
|
||||
#[cfg(not(feature = "no_index"))]
|
||||
lib.combine(exported_module!(index_functions));
|
||||
lib.combine_flatten(exported_module!(index_functions));
|
||||
});
|
||||
|
||||
#[export_module]
|
||||
|
@@ -26,10 +26,10 @@ def_package!(crate:BasicMathPackage:"Basic mathematic functions.", lib, {
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
{
|
||||
// Floating point functions
|
||||
lib.combine(exported_module!(float_functions));
|
||||
lib.combine_flatten(exported_module!(float_functions));
|
||||
|
||||
// Trig functions
|
||||
lib.combine(exported_module!(trig_functions));
|
||||
lib.combine_flatten(exported_module!(trig_functions));
|
||||
|
||||
// Register conversion functions
|
||||
lib.set_fn_1("to_float", |x: INT| Ok(x as FLOAT));
|
||||
|
@@ -60,9 +60,9 @@ def_package!(crate:MoreStringPackage:"Additional string utilities, including str
|
||||
reg_functions!(lib += float; f32, f64);
|
||||
|
||||
#[cfg(not(feature = "no_index"))]
|
||||
lib.combine(exported_module!(index_functions));
|
||||
lib.combine_flatten(exported_module!(index_functions));
|
||||
|
||||
lib.combine(exported_module!(string_functions));
|
||||
lib.combine_flatten(exported_module!(string_functions));
|
||||
|
||||
lib.set_raw_fn(
|
||||
"pad",
|
||||
|
@@ -26,7 +26,7 @@ use instant::Instant;
|
||||
|
||||
def_package!(crate:BasicTimePackage:"Basic timing utilities.", lib, {
|
||||
// Register date/time functions
|
||||
lib.combine(exported_module!(time_functions));
|
||||
lib.combine_flatten(exported_module!(time_functions));
|
||||
});
|
||||
|
||||
#[export_module]
|
||||
|
Reference in New Issue
Block a user