diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/generated_message_util.cc | 6 | ||||
-rw-r--r-- | src/google/protobuf/wire_format_lite.h | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/google/protobuf/generated_message_util.cc b/src/google/protobuf/generated_message_util.cc index c30c07ca..0c20d81c 100644 --- a/src/google/protobuf/generated_message_util.cc +++ b/src/google/protobuf/generated_message_util.cc @@ -36,7 +36,6 @@ #include <limits> - namespace google { namespace protobuf { namespace internal { @@ -51,8 +50,13 @@ double NaN() { const ::std::string* empty_string_; GOOGLE_PROTOBUF_DECLARE_ONCE(empty_string_once_init_); +void DeleteEmptyString() { + delete empty_string_; +} + void InitEmptyString() { empty_string_ = new string; + OnShutdown(&DeleteEmptyString); } diff --git a/src/google/protobuf/wire_format_lite.h b/src/google/protobuf/wire_format_lite.h index 1b5d7c53..21aa4889 100644 --- a/src/google/protobuf/wire_format_lite.h +++ b/src/google/protobuf/wire_format_lite.h @@ -239,9 +239,9 @@ class LIBPROTOBUF_EXPORT WireFormatLite { // that file to use these. // Avoid ugly line wrapping -#define input io::CodedInputStream* input -#define output io::CodedOutputStream* output -#define field_number int field_number +#define input io::CodedInputStream* input_arg +#define output io::CodedOutputStream* output_arg +#define field_number int field_number_arg #define INL GOOGLE_ATTRIBUTE_ALWAYS_INLINE // Read fields, not including tags. The assumption is that you already |