diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-09-02 20:21:21 +0200 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-09-05 10:32:16 +0200 |
commit | b4f5cdc6c490bd6ce2ca529b57a7b215bc6a3385 (patch) | |
tree | c62705ff2b358f19cfd002d676fd9e1d8efdc9b7 /src | |
parent | 089c0d10256acb2b7b7d434aa87300238db3cc19 (diff) | |
download | android-node-v8-b4f5cdc6c490bd6ce2ca529b57a7b215bc6a3385.tar.gz android-node-v8-b4f5cdc6c490bd6ce2ca529b57a7b215bc6a3385.tar.bz2 android-node-v8-b4f5cdc6c490bd6ce2ca529b57a7b215bc6a3385.zip |
src: skip warnings for our own deprecated APIs
This makes the compiler not emit deprecation warnings for places
where we use (or, in the case of non-functions, implement) our own
deprecated public C++ APIs.
PR-URL: https://github.com/nodejs/node/pull/22666
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/node.h b/src/node.h index 90e764f386..6bac3419f1 100644 --- a/src/node.h +++ b/src/node.h @@ -83,15 +83,18 @@ # define NODE_GNUC_AT_LEAST(major, minor, patch) (0) #endif -#if NODE_CLANG_AT_LEAST(2, 9, 0) || NODE_GNUC_AT_LEAST(4, 5, 0) -# define NODE_DEPRECATED(message, declarator) \ +#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) \ +# elif defined(_MSC_VER) +# define NODE_DEPRECATED(message, declarator) \ __declspec(deprecated) declarator -#else -# define NODE_DEPRECATED(message, declarator) \ - declarator +# else +# define NODE_DEPRECATED(message, declarator) declarator +# endif #endif // Forward-declare libuv loop |