GeezerVison is showing github.com — src: skip warnings for our own deprecated APIs · nodejs/node@e5e72e6
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/node.h +10-7Lines changed: 10 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
83 | 83 | # define NODE_GNUC_AT_LEAST(major, minor, patch) (0) |
84 | 84 | #endif |
85 | 85 |
|
86 | | -#if NODE_CLANG_AT_LEAST(2, 9, 0) || NODE_GNUC_AT_LEAST(4, 5, 0) |
87 | | -# define NODE_DEPRECATED(message, declarator) \ |
| 86 | +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS |
| 87 | +# define NODE_DEPRECATED(message, declarator) declarator |
| 88 | +#else // NODE_WANT_INTERNALS |
| 89 | +# if NODE_CLANG_AT_LEAST(2, 9, 0) || NODE_GNUC_AT_LEAST(4, 5, 0) |
| 90 | +# define NODE_DEPRECATED(message, declarator) \ |
88 | 91 | __attribute__((deprecated(message))) declarator |
89 | | -#elif defined(_MSC_VER) |
90 | | -# define NODE_DEPRECATED(message, declarator) \ |
| 92 | +# elif defined(_MSC_VER) |
| 93 | +# define NODE_DEPRECATED(message, declarator) \ |
91 | 94 | __declspec(deprecated) declarator |
92 | | -#else |
93 | | -# define NODE_DEPRECATED(message, declarator) \ |
94 | | - declarator |
| 95 | +# else |
| 96 | +# define NODE_DEPRECATED(message, declarator) declarator |
| 97 | +# endif |
95 | 98 | #endif |
96 | 99 |
|
97 | 100 | // Forward-declare libuv loop |
|