Commit b175c72e authored by teboring's avatar teboring

Merge branch '3.0.0-alpha-3-fix' of https://github.com/TeBoring/protobuf into 3.0.0-alpha-3-fix

parents 8565e1e1 f87e5b7e
...@@ -90,3 +90,12 @@ objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/xcuserdata/ ...@@ -90,3 +90,12 @@ objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/xcuserdata/
objectivec/ProtocolBuffers_OSX.xcodeproj/xcuserdata/ objectivec/ProtocolBuffers_OSX.xcodeproj/xcuserdata/
objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/xcuserdata/ objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/xcuserdata/
objectivec/ProtocolBuffers_iOS.xcodeproj/xcuserdata/ objectivec/ProtocolBuffers_iOS.xcodeproj/xcuserdata/
# Comformance test output
conformance/.libs/
conformance/com/
conformance/conformance-cpp
conformance/conformance-test-runner
conformance/conformance.pb.cc
conformance/conformance.pb.h
conformance/protoc_middleman
...@@ -212,11 +212,11 @@ void ...@@ -212,11 +212,11 @@ void
MapField<Key, T, kKeyFieldType, kValueFieldType, MapField<Key, T, kKeyFieldType, kValueFieldType,
default_enum_value>::SyncRepeatedFieldWithMapNoLock() const { default_enum_value>::SyncRepeatedFieldWithMapNoLock() const {
if (repeated_field_ == NULL) { if (repeated_field_ == NULL) {
if (arena_ == NULL) { if (MapFieldBase::arena_ == NULL) {
repeated_field_ = new RepeatedPtrField<Message>(); repeated_field_ = new RepeatedPtrField<Message>();
} else { } else {
repeated_field_ = repeated_field_ = Arena::CreateMessage<RepeatedPtrField<Message> >(
Arena::CreateMessage<RepeatedPtrField<Message> >(arena_); MapFieldBase::arena_);
} }
} }
const Map<Key, T>& map = GetInternalMap(); const Map<Key, T>& map = GetInternalMap();
...@@ -229,7 +229,8 @@ MapField<Key, T, kKeyFieldType, kValueFieldType, ...@@ -229,7 +229,8 @@ MapField<Key, T, kKeyFieldType, kValueFieldType,
it != map.end(); ++it) { it != map.end(); ++it) {
InitDefaultEntryOnce(); InitDefaultEntryOnce();
GOOGLE_CHECK(default_entry_ != NULL); GOOGLE_CHECK(default_entry_ != NULL);
EntryType* new_entry = down_cast<EntryType*>(default_entry_->New(arena_)); EntryType* new_entry =
down_cast<EntryType*>(default_entry_->New(MapFieldBase::arena_));
repeated_field->AddAllocated(new_entry); repeated_field->AddAllocated(new_entry);
(*new_entry->mutable_key()) = it->first; (*new_entry->mutable_key()) = it->first;
(*new_entry->mutable_value()) = it->second; (*new_entry->mutable_value()) = it->second;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment