diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-04-29 19:57:41 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2015-04-30 01:05:08 +0200 |
commit | 609fa0de039f4285c402ac3f646fcd5d4828d3aa (patch) | |
tree | dcd4ee66af359514e48ad7b9bd945498ab5e15cb /src/node.h | |
parent | d5ce47e433c24e9773373ccede613df9f051e7b1 (diff) | |
download | android-node-v8-609fa0de039f4285c402ac3f646fcd5d4828d3aa.tar.gz android-node-v8-609fa0de039f4285c402ac3f646fcd5d4828d3aa.tar.bz2 android-node-v8-609fa0de039f4285c402ac3f646fcd5d4828d3aa.zip |
src: fix NODE_DEPRECATED macro
The NODE_DEPRECATED macro was piggybacking on the V8_DEPRECATED macro
but that macro is silent unless V8_DEPRECATION_WARNINGS is defined,
something io.js doesn't do. Ergo, no deprecation notices were being
issued.
PR-URL: https://github.com/iojs/io.js/pull/1565
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/node.h b/src/node.h index 28b40aa072..5962c32d5b 100644 --- a/src/node.h +++ b/src/node.h @@ -42,7 +42,16 @@ #include "v8.h" // NOLINT(build/include_order) #include "node_version.h" // NODE_MODULE_VERSION -#define NODE_DEPRECATED(msg, fn) V8_DEPRECATED(msg, fn) +#if defined(__GNUC__) +# 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 // Forward-declare libuv loop struct uv_loop_s; |