60 lines
1.6 KiB
Diff
60 lines
1.6 KiB
Diff
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
|
|
@@ -48,6 +48,23 @@
|
|
}
|
|
}
|
|
|
|
+::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
|
|
} // namespace google
|
|
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
|
|
@@ -219,12 +219,7 @@
|
|
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) {
|
|
@@ -248,12 +243,7 @@
|
|
}
|
|
}
|
|
|
|
- inline void DestroyNoArena(const ::std::string* default_value) {
|
|
- if (ptr_ != default_value) {
|
|
- delete ptr_;
|
|
- }
|
|
- ptr_ = NULL;
|
|
- }
|
|
+ void DestroyNoArena(const ::std::string* default_value);
|
|
|
|
inline void ClearToEmptyNoArena(const ::std::string* default_value) {
|
|
if (ptr_ == default_value) {
|