From e2be70b035459cb534360b72ece4ff2abaa09cd7 Mon Sep 17 00:00:00 2001 From: Aapo Alasuutari Date: Thu, 20 Oct 2022 07:07:37 +0300 Subject: feat(ext/ffi): Make op_ffi_ptr_of fast (#16297) Makes `op_ffi_ptr_of` fast. One of the tests changed from printing `false` to `true` as the fast `&[u8]` slice path creates the slice with a null pointer. Thus the `op_ffi_ptr_of` will now return a null pointer value whereas previously it returned a dangling pointer value. --- cli/tests/testdata/run/ffi/unstable_ffi_4.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/tests') diff --git a/cli/tests/testdata/run/ffi/unstable_ffi_4.js b/cli/tests/testdata/run/ffi/unstable_ffi_4.js index 8b4f3d75a..150791233 100644 --- a/cli/tests/testdata/run/ffi/unstable_ffi_4.js +++ b/cli/tests/testdata/run/ffi/unstable_ffi_4.js @@ -1 +1 @@ -Deno.core.ops.op_ffi_ptr_of(new Uint8Array(0)); +Deno.core.ops.op_ffi_ptr_of(new Uint8Array(0), new Uint32Array(2)); -- cgit v1.2.3