2016-07-31 20:44:31 +00:00
|
|
|
unchanged:
|
|
|
|
--- protobuf-cleaned/src/google/protobuf/arenastring.cc 2015-12-30 13:21:46.000000000 -0800
|
|
|
|
+++ protobuf-patched/src/google/protobuf/arenastring.cc 2016-03-31 13:25:40.888006485 -0700
|
2018-05-05 00:30:16 +00:00
|
|
|
@@ -37,6 +37,20 @@
|
|
|
|
namespace protobuf {
|
|
|
|
namespace internal {
|
2016-07-31 20:44:31 +00:00
|
|
|
|
|
|
|
+::std::string* ArenaStringPtr::MutableNoArena(
|
|
|
|
+ const ::std::string* default_value) {
|
|
|
|
+ if (ptr_ == default_value) {
|
|
|
|
+ CreateInstanceNoArena(default_value);
|
|
|
|
+ }
|
|
|
|
+ return ptr_;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void ArenaStringPtr::DestroyNoArena(const ::std::string* default_value) {
|
|
|
|
+ if (ptr_ != default_value) {
|
|
|
|
+ delete ptr_;
|
|
|
|
+ }
|
|
|
|
+ ptr_ = NULL;
|
|
|
|
+}
|
2018-05-05 00:30:16 +00:00
|
|
|
|
2016-07-31 20:44:31 +00:00
|
|
|
} // namespace internal
|
|
|
|
} // namespace protobuf
|
|
|
|
only in patch2:
|
|
|
|
unchanged:
|
|
|
|
--- protobuf-cleaned/src/google/protobuf/arenastring.h 2015-12-30 13:21:46.000000000 -0800
|
|
|
|
+++ protobuf-patched/src/google/protobuf/arenastring.h 2016-03-31 13:25:40.888006485 -0700
|
2018-05-05 00:30:16 +00:00
|
|
|
@@ -214,12 +214,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
|
|
|
|
|
|
|
|
inline const ::std::string& GetNoArena() const { return *ptr_; }
|
2016-07-31 20:44:31 +00:00
|
|
|
|
|
|
|
- inline ::std::string* MutableNoArena(const ::std::string* default_value) {
|
|
|
|
- if (ptr_ == default_value) {
|
|
|
|
- CreateInstanceNoArena(default_value);
|
|
|
|
- }
|
|
|
|
- return ptr_;
|
|
|
|
- }
|
|
|
|
+ ::std::string* MutableNoArena(const ::std::string* default_value);
|
|
|
|
|
|
|
|
inline ::std::string* ReleaseNoArena(const ::std::string* default_value) {
|
|
|
|
if (ptr_ == default_value) {
|
2018-05-05 00:30:16 +00:00
|
|
|
@@ -243,11 +238,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
|
2016-07-31 20:44:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- inline void DestroyNoArena(const ::std::string* default_value) {
|
|
|
|
- if (ptr_ != default_value) {
|
|
|
|
- delete ptr_;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
+ void DestroyNoArena(const ::std::string* default_value);
|
|
|
|
|
|
|
|
inline void ClearToEmptyNoArena(const ::std::string* default_value) {
|
|
|
|
if (ptr_ == default_value) {
|