From c2e6a8f215febe22254c579d436f4947287bc37d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 2 Jun 2024 20:26:23 +0200 Subject: [PATCH] benchmark: fix napi/ref addon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/node/pull/53212#issuecomment-2142566866 PR-URL: https://github.com/nodejs/node/pull/53233 Reviewed-By: Yagiz Nizipli Reviewed-By: Vinícius Lourenço Claro Cardoso Reviewed-By: Luigi Pinca Reviewed-By: Chengzhong Wu --- benchmark/napi/ref/addon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/benchmark/napi/ref/addon.c b/benchmark/napi/ref/addon.c index 3fb8de603d3ced..2a7d3c8b2df23e 100644 --- a/benchmark/napi/ref/addon.c +++ b/benchmark/napi/ref/addon.c @@ -1,6 +1,5 @@ -#include -#define NAPI_EXPERIMENTAL #include +#include #define NAPI_CALL(env, call) \ do { \ @@ -34,8 +33,7 @@ SetCount(napi_env env, napi_callback_info info) { return NULL; } -static void -IncrementCounter(napi_env env, void* data, void* hint) { +static void IncrementCounter(node_api_nogc_env env, void* data, void* hint) { size_t* count = data; (*count) = (*count) + 1; }