Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
src: define noreturn attribute for windows
  • Loading branch information
lxbndr committed Jan 22, 2020
commit f58495d1374b95ae41cc2034d9820bcb3117fee5
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