benchmark: fix napi/ref addon

Refs: https://github.com/nodejs/node/pull/53212#issuecomment-2142566866
PR-URL: https://github.com/nodejs/node/pull/53233
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Michaël Zasso authored and Richard Lau committed 2024-07-19 02:59:14 +00:00
1 parent 19b6fc9e17
commit 1e2bc2c2d0
1 file changed
+2 -4
+2 -4
View File
@@ -1,6 +1,5 @@
#include <stdlib.h>
#define NAPI_EXPERIMENTAL
#include <node_api.h>
#include <stdlib.h>
#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;
}