mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
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:
parent
43ab5b9596
commit
881e196b19
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user