Skip to content

Commit

Permalink
n-api: change #ifdef to #if in node_api_types
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
danbev authored and targos committed Jan 24, 2019
1 parent 0f91e03 commit f688e73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_api_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ typedef struct napi_async_work__* napi_async_work;
typedef struct napi_threadsafe_function__* napi_threadsafe_function;
#endif // NAPI_VERSION >= 4

#ifdef NAPI_VERSION >= 4
#if NAPI_VERSION >= 4
typedef enum {
napi_tsfn_release,
napi_tsfn_abort
Expand All @@ -27,7 +27,7 @@ typedef void (*napi_async_execute_callback)(napi_env env,
typedef void (*napi_async_complete_callback)(napi_env env,
napi_status status,
void* data);
#ifdef NAPI_VERSION >= 4
#if NAPI_VERSION >= 4
typedef void (*napi_threadsafe_function_call_js)(napi_env env,
napi_value js_callback,
void* context,
Expand Down

0 comments on commit f688e73

Please sign in to comment.