refactor: prevent node macros from overriding base (#17178)
This commit is contained in:
parent
59a7fa6927
commit
2adbc7836b
1 changed files with 30 additions and 3 deletions
|
@ -17,18 +17,32 @@
|
||||||
// again. But we still need the tracing functions, so declaring them.
|
// again. But we still need the tracing functions, so declaring them.
|
||||||
#define SRC_TRACING_TRACE_EVENT_H_
|
#define SRC_TRACING_TRACE_EVENT_H_
|
||||||
|
|
||||||
|
#pragma push_macro("ASSERT")
|
||||||
|
#pragma push_macro("CHECK")
|
||||||
|
#pragma push_macro("CHECK_EQ")
|
||||||
|
#pragma push_macro("CHECK_GE")
|
||||||
|
#pragma push_macro("CHECK_GT")
|
||||||
|
#pragma push_macro("CHECK_LE")
|
||||||
|
#pragma push_macro("CHECK_LT")
|
||||||
|
#pragma push_macro("CHECK_NE")
|
||||||
|
#pragma push_macro("DISALLOW_COPY_AND_ASSIGN")
|
||||||
|
#pragma push_macro("LIKELY")
|
||||||
|
#pragma push_macro("NO_RETURN")
|
||||||
|
#pragma push_macro("UNLIKELY")
|
||||||
|
|
||||||
#undef ASSERT
|
#undef ASSERT
|
||||||
#undef CHECK
|
#undef CHECK
|
||||||
#undef CHECK_EQ
|
#undef CHECK_EQ
|
||||||
#undef CHECK_NE
|
|
||||||
#undef CHECK_GE
|
#undef CHECK_GE
|
||||||
#undef CHECK_GT
|
#undef CHECK_GT
|
||||||
#undef CHECK_LE
|
#undef CHECK_LE
|
||||||
#undef CHECK_LT
|
#undef CHECK_LT
|
||||||
#undef UNLIKELY
|
#undef CHECK_NE
|
||||||
#undef DISALLOW_COPY_AND_ASSIGN
|
#undef DISALLOW_COPY_AND_ASSIGN
|
||||||
#undef NO_RETURN
|
|
||||||
#undef LIKELY
|
#undef LIKELY
|
||||||
|
#undef NO_RETURN
|
||||||
|
#undef UNLIKELY
|
||||||
|
|
||||||
#undef debug_string // This is defined in macOS SDK in AssertMacros.h.
|
#undef debug_string // This is defined in macOS SDK in AssertMacros.h.
|
||||||
#undef require_string // This is defined in macOS SDK in AssertMacros.h.
|
#undef require_string // This is defined in macOS SDK in AssertMacros.h.
|
||||||
#include "env-inl.h"
|
#include "env-inl.h"
|
||||||
|
@ -39,6 +53,19 @@
|
||||||
#include "node_options.h"
|
#include "node_options.h"
|
||||||
#include "node_platform.h"
|
#include "node_platform.h"
|
||||||
|
|
||||||
|
#pragma pop_macro("ASSERT")
|
||||||
|
#pragma pop_macro("CHECK")
|
||||||
|
#pragma pop_macro("CHECK_EQ")
|
||||||
|
#pragma pop_macro("CHECK_GE")
|
||||||
|
#pragma pop_macro("CHECK_GT")
|
||||||
|
#pragma pop_macro("CHECK_LE")
|
||||||
|
#pragma pop_macro("CHECK_LT")
|
||||||
|
#pragma pop_macro("CHECK_NE")
|
||||||
|
#pragma pop_macro("DISALLOW_COPY_AND_ASSIGN")
|
||||||
|
#pragma pop_macro("LIKELY")
|
||||||
|
#pragma pop_macro("NO_RETURN")
|
||||||
|
#pragma pop_macro("UNLIKELY")
|
||||||
|
|
||||||
namespace node {
|
namespace node {
|
||||||
namespace tracing {
|
namespace tracing {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue