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 2024-06-02 20:26:23 +02:00 committed by GitHub
parent 43ab5b9596
commit 881e196b19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;
}