aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/stubs/logging.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/stubs/logging.h')
-rw-r--r--src/google/protobuf/stubs/logging.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/google/protobuf/stubs/logging.h b/src/google/protobuf/stubs/logging.h
index f69605d9..8d7e6401 100644
--- a/src/google/protobuf/stubs/logging.h
+++ b/src/google/protobuf/stubs/logging.h
@@ -34,6 +34,8 @@
#include <google/protobuf/stubs/macros.h>
#include <google/protobuf/stubs/port.h>
+#include <google/protobuf/port_def.inc>
+
// ===================================================================
// emulates google3/base/logging.h
@@ -70,7 +72,7 @@ namespace internal {
class LogFinisher;
-class LIBPROTOBUF_EXPORT LogMessage {
+class PROTOBUF_EXPORT LogMessage {
public:
LogMessage(LogLevel level, const char* filename, int line);
~LogMessage();
@@ -102,7 +104,7 @@ class LIBPROTOBUF_EXPORT LogMessage {
// Used to make the entire "LOG(BLAH) << etc." expression have a void return
// type and print a newline after each message.
-class LIBPROTOBUF_EXPORT LogFinisher {
+class PROTOBUF_EXPORT LogFinisher {
public:
void operator=(LogMessage& other);
};
@@ -162,7 +164,7 @@ namespace internal {
template<typename T>
T* CheckNotNull(const char* /* file */, int /* line */,
const char* name, T* val) {
- if (val == NULL) {
+ if (val == nullptr) {
GOOGLE_LOG(FATAL) << name;
}
return val;
@@ -170,7 +172,7 @@ T* CheckNotNull(const char* /* file */, int /* line */,
} // namespace internal
#define GOOGLE_CHECK_NOTNULL(A) \
::google::protobuf::internal::CheckNotNull(\
- __FILE__, __LINE__, "'" #A "' must not be NULL", (A))
+ __FILE__, __LINE__, "'" #A "' must not be nullptr", (A))
#ifdef NDEBUG
@@ -208,7 +210,7 @@ typedef void LogHandler(LogLevel level, const char* filename, int line,
// also help end users figure out a problem. If you would prefer that
// these messages be sent somewhere other than stderr, call SetLogHandler()
// to set your own handler. This returns the old handler. Set the handler
-// to NULL to ignore log messages (but see also LogSilencer, below).
+// to nullptr to ignore log messages (but see also LogSilencer, below).
//
// Obviously, SetLogHandler is not thread-safe. You should only call it
// at initialization time, and probably not from library code. If you
@@ -216,7 +218,7 @@ typedef void LogHandler(LogLevel level, const char* filename, int line,
// have some code that tends to trigger them frequently and you know
// the warnings are not important to you), use the LogSilencer class
// below.
-LIBPROTOBUF_EXPORT LogHandler* SetLogHandler(LogHandler* new_func);
+PROTOBUF_EXPORT LogHandler* SetLogHandler(LogHandler* new_func);
// Create a LogSilencer if you want to temporarily suppress all log
// messages. As long as any LogSilencer objects exist, non-fatal
@@ -225,7 +227,7 @@ LIBPROTOBUF_EXPORT LogHandler* SetLogHandler(LogHandler* new_func);
// accidentally suppress log messages occurring in another thread, but
// since messages are generally for debugging purposes only, this isn't
// a big deal. If you want to intercept log messages, use SetLogHandler().
-class LIBPROTOBUF_EXPORT LogSilencer {
+class PROTOBUF_EXPORT LogSilencer {
public:
LogSilencer();
~LogSilencer();
@@ -234,4 +236,6 @@ class LIBPROTOBUF_EXPORT LogSilencer {
} // namespace protobuf
} // namespace google
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_STUBS_LOGGING_H_