Skip to content

Commit

Permalink
src: define noreturn attribute for windows
Browse files Browse the repository at this point in the history
PR-URL: #31467
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
lxbndr authored and codebytere committed Feb 17, 2020
1 parent 9e9dbd4 commit bc0c142
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/node_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ struct uv_loop_s; // Forward declaration.
# define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
#endif

#ifdef __GNUC__
#define NAPI_NO_RETURN __attribute__((noreturn))
#if defined(__GNUC__)
# define NAPI_NO_RETURN __attribute__((noreturn))
#elif defined(_WIN32)
# define NAPI_NO_RETURN __declspec(noreturn)
#else
#define NAPI_NO_RETURN
# define NAPI_NO_RETURN
#endif

typedef napi_value (*napi_addon_register_func)(napi_env env,
Expand Down

0 comments on commit bc0c142

Please sign in to comment.