blob: d2caa5bb67fae5f6145fe4f1947471114820e4b1 [file] [log] [blame]
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
@@ -37,6 +37,20 @@
namespace protobuf {
namespace internal {
+::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;
+}
} // 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
@@ -214,12 +214,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
inline const ::std::string& GetNoArena() const { return *ptr_; }
- 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) {
@@ -243,11 +238,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
}
}
- 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) {