Skip to content

Commit f688e73

Browse files
danbevtargos
authored andcommitted
n-api: change #ifdef to #if in node_api_types
Currently, there are a number of compiler warnings like the following: In file included from ../src/node_api.h:11: ../src/node_api_types.h:13:21:x warning: extra tokens at end of #ifdef directive [-Wextra-tokens] #ifdef NAPI_VERSION >= 4 This commit changes the #ifdef macros to #if. PR-URL: #25635 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 0f91e03 commit f688e73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_api_types.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ typedef struct napi_async_work__* napi_async_work;
1010
typedef struct napi_threadsafe_function__* napi_threadsafe_function;
1111
#endif // NAPI_VERSION >= 4
1212

13-
#ifdef NAPI_VERSION >= 4
13+
#if NAPI_VERSION >= 4
1414
typedef enum {
1515
napi_tsfn_release,
1616
napi_tsfn_abort
@@ -27,7 +27,7 @@ typedef void (*napi_async_execute_callback)(napi_env env,
2727
typedef void (*napi_async_complete_callback)(napi_env env,
2828
napi_status status,
2929
void* data);
30-
#ifdef NAPI_VERSION >= 4
30+
#if NAPI_VERSION >= 4
3131
typedef void (*napi_threadsafe_function_call_js)(napi_env env,
3232
napi_value js_callback,
3333
void* context,

0 commit comments

Comments
 (0)