OLD | NEW |
(Empty) | |
| 1 unchanged: |
| 2 --- protobuf-cleaned/src/google/protobuf/arenastring.cc 2015-12-30 13:21:46.0000
00000 -0800 |
| 3 +++ protobuf-patched/src/google/protobuf/arenastring.cc 2016-03-31 13:25:40.8880
06485 -0700 |
| 4 @@ -48,6 +48,23 @@ |
| 5 } |
| 6 } |
| 7 |
| 8 +::std::string* ArenaStringPtr::MutableNoArena( |
| 9 + const ::std::string* default_value) { |
| 10 + if (ptr_ == default_value) { |
| 11 + CreateInstanceNoArena(default_value); |
| 12 + } |
| 13 + return ptr_; |
| 14 +} |
| 15 + |
| 16 + |
| 17 +void ArenaStringPtr::DestroyNoArena(const ::std::string* default_value) { |
| 18 + if (ptr_ != default_value) { |
| 19 + delete ptr_; |
| 20 + } |
| 21 + ptr_ = NULL; |
| 22 +} |
| 23 + |
| 24 + |
| 25 } // namespace internal |
| 26 } // namespace protobuf |
| 27 } // namespace google |
| 28 only in patch2: |
| 29 unchanged: |
| 30 --- protobuf-cleaned/src/google/protobuf/arenastring.h 2015-12-30 13:21:46.0000
00000 -0800 |
| 31 +++ protobuf-patched/src/google/protobuf/arenastring.h 2016-03-31 13:25:40.8880
06485 -0700 |
| 32 @@ -219,12 +219,7 @@ |
| 33 return *ptr_; |
| 34 } |
| 35 |
| 36 - inline ::std::string* MutableNoArena(const ::std::string* default_value) { |
| 37 - if (ptr_ == default_value) { |
| 38 - CreateInstanceNoArena(default_value); |
| 39 - } |
| 40 - return ptr_; |
| 41 - } |
| 42 + ::std::string* MutableNoArena(const ::std::string* default_value); |
| 43 |
| 44 inline ::std::string* ReleaseNoArena(const ::std::string* default_value) { |
| 45 if (ptr_ == default_value) { |
| 46 @@ -248,12 +243,7 @@ |
| 47 } |
| 48 } |
| 49 |
| 50 - inline void DestroyNoArena(const ::std::string* default_value) { |
| 51 - if (ptr_ != default_value) { |
| 52 - delete ptr_; |
| 53 - } |
| 54 - ptr_ = NULL; |
| 55 - } |
| 56 + void DestroyNoArena(const ::std::string* default_value); |
| 57 |
| 58 inline void ClearToEmptyNoArena(const ::std::string* default_value) { |
| 59 if (ptr_ == default_value) { |
OLD | NEW |