Skip to content

Commit

Permalink
benchmark: fix napi/ref addon
Browse files Browse the repository at this point in the history
Refs: #53212 (comment)
PR-URL: #53233
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
  • Loading branch information
targos committed Jun 3, 2024
1 parent 0e85a84 commit feb0ba2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions benchmark/napi/ref/addon.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <stdlib.h>
#define NAPI_EXPERIMENTAL
#include <node_api.h>
#include <stdlib.h>

#define NAPI_CALL(env, call) \
do { \
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit feb0ba2

Please sign in to comment.