naiveproxy/third_party/protobuf/patches/0008-uninline_get_empty_string.patch

32 lines
1.2 KiB
Diff
Raw Normal View History

2018-12-10 05:59:24 +03:00
diff --git a/src/google/protobuf/message_lite.cc b/src/google/protobuf/message_lite.cc
index 123b142d..329b475c 100644
--- a/src/google/protobuf/message_lite.cc
+++ b/src/google/protobuf/message_lite.cc
@@ -400,6 +400,10 @@ void SetProto3PreserveUnknownsDefault(bool preserve) {
proto3_preserve_unknown_ = preserve;
}
+const ::std::string& GetEmptyString() {
+ ::google::protobuf::GoogleOnceInit(&empty_string_once_init_, &InitEmptyString);
+ return GetEmptyStringAlreadyInited();
+}
} // namespace internal
diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h
index 4cbec330..e9dda7e7 100644
--- a/src/google/protobuf/message_lite.h
+++ b/src/google/protobuf/message_lite.h
@@ -137,10 +137,7 @@ LIBPROTOBUF_EXPORT inline const ::std::string& GetEmptyStringAlreadyInited() {
return fixed_address_empty_string.get();
}
-LIBPROTOBUF_EXPORT inline const ::std::string& GetEmptyString() {
- ::google::protobuf::GoogleOnceInit(&empty_string_once_init_, &InitEmptyString);
- return GetEmptyStringAlreadyInited();
-}
+LIBPROTOBUF_EXPORT const ::std::string& GetEmptyString();
LIBPROTOBUF_EXPORT size_t StringSpaceUsedExcludingSelfLong(const string& str);
#endif // SWIG