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 <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>
  • Loading branch information
targos authored and richardlau committed Jul 19, 2024
1 parent e578c0b commit c2e6a8f
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 c2e6a8f

Please sign in to comment.