Add call_native_fn for context.

This commit is contained in:
Stephen Chung
2022-10-14 16:57:14 +08:00
parent 71e475be13
commit ea63c66cf0
6 changed files with 128 additions and 19 deletions

View File

@@ -38,7 +38,7 @@ pub fn print_with_func(
ctx: &NativeCallContext,
value: &mut Dynamic,
) -> crate::ImmutableString {
match ctx.call_fn_raw(fn_name, true, false, &mut [value]) {
match ctx.call_native_fn_raw(fn_name, true, &mut [value]) {
Ok(result) if result.is::<crate::ImmutableString>() => {
result.into_immutable_string().expect("`ImmutableString`")
}