Skip to content
Merged
Changes from 1 commit
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
Next Next commit
src: use C++14 deprecated attribute for NODE_DEPRECATED
This has been standardized for a while, so there's no real
reason not to just use it over compiler-specific alternatives.

Signed-off-by: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
addaleax committed Jun 5, 2026
commit df4f85fb890fb864cb635835231ebe5cd0ca4cdb
10 changes: 1 addition & 9 deletions src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,7 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
# define NODE_DEPRECATED(message, declarator) declarator
#else // NODE_WANT_INTERNALS
# if NODE_CLANG_AT_LEAST(2, 9, 0) || NODE_GNUC_AT_LEAST(4, 5, 0)
# define NODE_DEPRECATED(message, declarator) \
__attribute__((deprecated(message))) declarator
# elif defined(_MSC_VER)
# define NODE_DEPRECATED(message, declarator) \
__declspec(deprecated) declarator
# else
# define NODE_DEPRECATED(message, declarator) declarator
# endif
# define NODE_DEPRECATED(message, declarator) [[deprecated(message)]] declarator
#endif

// Forward-declare libuv loop
Expand Down
Loading