Add new &Module parameter to native functions.

This commit is contained in:
Stephen Chung
2020-07-06 12:04:02 +08:00
parent 495d202af4
commit ea86888638
10 changed files with 107 additions and 99 deletions

View File

@@ -4,6 +4,7 @@
use crate::any::{Dynamic, Variant};
use crate::engine::Engine;
use crate::fn_native::{CallableFunction, FnAny, FnCallArgs, SendSync};
use crate::module::Module;
use crate::parser::FnAccess;
use crate::result::EvalAltResult;
use crate::utils::ImmutableString;
@@ -119,7 +120,7 @@ macro_rules! make_func {
// ^ function parameter generic type name (A, B, C etc.)
// ^ dereferencing function
Box::new(move |_: &Engine, args: &mut FnCallArgs| {
Box::new(move |_: &Engine, _: &Module, args: &mut FnCallArgs| {
// The arguments are assumed to be of the correct number and types!
#[allow(unused_variables, unused_mut)]