Remove generics for call_fn_raw_raw.
This commit is contained in:
parent
1d904f4758
commit
5a756e0899
@ -160,6 +160,8 @@ impl Engine {
|
|||||||
this_ptr: Option<&mut Dynamic>,
|
this_ptr: Option<&mut Dynamic>,
|
||||||
arg_values: impl AsMut<[Dynamic]>,
|
arg_values: impl AsMut<[Dynamic]>,
|
||||||
) -> RhaiResult {
|
) -> RhaiResult {
|
||||||
|
let mut arg_values = arg_values;
|
||||||
|
|
||||||
self.call_fn_internal(
|
self.call_fn_internal(
|
||||||
scope,
|
scope,
|
||||||
&mut GlobalRuntimeState::new(self),
|
&mut GlobalRuntimeState::new(self),
|
||||||
@ -167,9 +169,9 @@ impl Engine {
|
|||||||
ast,
|
ast,
|
||||||
eval_ast,
|
eval_ast,
|
||||||
rewind_scope,
|
rewind_scope,
|
||||||
name,
|
name.as_ref(),
|
||||||
this_ptr,
|
this_ptr,
|
||||||
arg_values,
|
arg_values.as_mut(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/// _(internals)_ Call a script function defined in an [`AST`] with multiple [`Dynamic`] arguments.
|
/// _(internals)_ Call a script function defined in an [`AST`] with multiple [`Dynamic`] arguments.
|
||||||
@ -209,9 +211,9 @@ impl Engine {
|
|||||||
ast: &AST,
|
ast: &AST,
|
||||||
eval_ast: bool,
|
eval_ast: bool,
|
||||||
rewind_scope: bool,
|
rewind_scope: bool,
|
||||||
name: impl AsRef<str>,
|
name: &str,
|
||||||
this_ptr: Option<&mut Dynamic>,
|
this_ptr: Option<&mut Dynamic>,
|
||||||
arg_values: impl AsMut<[Dynamic]>,
|
arg_values: &mut [Dynamic],
|
||||||
) -> RhaiResult {
|
) -> RhaiResult {
|
||||||
self.call_fn_internal(
|
self.call_fn_internal(
|
||||||
scope,
|
scope,
|
||||||
@ -225,7 +227,6 @@ impl Engine {
|
|||||||
arg_values,
|
arg_values,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Call a script function defined in an [`AST`] with multiple [`Dynamic`] arguments.
|
/// Call a script function defined in an [`AST`] with multiple [`Dynamic`] arguments.
|
||||||
fn call_fn_internal(
|
fn call_fn_internal(
|
||||||
&self,
|
&self,
|
||||||
@ -235,9 +236,9 @@ impl Engine {
|
|||||||
ast: &AST,
|
ast: &AST,
|
||||||
eval_ast: bool,
|
eval_ast: bool,
|
||||||
rewind_scope: bool,
|
rewind_scope: bool,
|
||||||
name: impl AsRef<str>,
|
name: &str,
|
||||||
this_ptr: Option<&mut Dynamic>,
|
this_ptr: Option<&mut Dynamic>,
|
||||||
arg_values: impl AsMut<[Dynamic]>,
|
arg_values: &mut [Dynamic],
|
||||||
) -> RhaiResult {
|
) -> RhaiResult {
|
||||||
let statements = ast.statements();
|
let statements = ast.statements();
|
||||||
|
|
||||||
@ -251,9 +252,7 @@ impl Engine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let name = name.as_ref();
|
|
||||||
let mut this_ptr = this_ptr;
|
let mut this_ptr = this_ptr;
|
||||||
let mut arg_values = arg_values;
|
|
||||||
let mut args: StaticVec<_> = arg_values.as_mut().iter_mut().collect();
|
let mut args: StaticVec<_> = arg_values.as_mut().iter_mut().collect();
|
||||||
|
|
||||||
let fn_def = ast
|
let fn_def = ast
|
||||||
|
Loading…
x
Reference in New Issue
Block a user