From 6afdcf59b80b4a3ecf60f220ddff14f4309133d0 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Sat, 1 Jul 2023 16:07:05 -0600 Subject: refactor(ops): op2 supports strings in argument and return position (#19613) Support strings (&str, String, and Cow) in the argument position and String in the return position. Avoids copies where possible, though this is not always something we can do. --- ops/op2/test_cases/sync/add.out | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ops/op2/test_cases/sync/add.out') diff --git a/ops/op2/test_cases/sync/add.out b/ops/op2/test_cases/sync/add.out index c8f77ab92..a73f032aa 100644 --- a/ops/op2/test_cases/sync/add.out +++ b/ops/op2/test_cases/sync/add.out @@ -52,7 +52,9 @@ impl op_add { arg0: u32, arg1: u32, ) -> u32 { - let result = Self::call(arg0 as _, arg1 as _); + let arg0 = arg0 as _; + let arg1 = arg1 as _; + let result = Self::call(arg0, arg1); result } extern "C" fn v8_fn_ptr(info: *const deno_core::v8::FunctionCallbackInfo) { -- cgit v1.2.3