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 <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
lxbndr authored and codebytere committed Mar 17, 2020
1 parent ce6b9d1 commit fb32043
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 fb32043

Please sign in to comment.