diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2015-05-21 17:14:52 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2015-05-22 14:27:31 -0400 |
commit | 1dcc329427fd103a0abd96ab787270f5d0a31861 (patch) | |
tree | cf1c52df0e1effa3d0985a3406a71c38c3a4e487 /objectivec/GPBExtensionRegistry.m | |
parent | c3480926f98eb7c45224daae5cf0373e120b3b8d (diff) | |
download | protobuf-1dcc329427fd103a0abd96ab787270f5d0a31861.tar.gz protobuf-1dcc329427fd103a0abd96ab787270f5d0a31861.tar.bz2 protobuf-1dcc329427fd103a0abd96ab787270f5d0a31861.zip |
Objective C Second Alpha Drop
- Style fixups in the code.
- map<> serialization fixes and more tests.
- Autocreation of map<> fields (to match repeated fields).
- @@protoc_insertion_point(global_scope|imports).
- Fixup proto2 syntax extension support.
- Move all startup code to +initialize so it happen on class usage and not app startup.
- Have generated headers use forward declarations and move imports into generated code, reduces what is need at compile time to speed up compiled and avoid pointless rippling of rebuilds.
Diffstat (limited to 'objectivec/GPBExtensionRegistry.m')
-rw-r--r-- | objectivec/GPBExtensionRegistry.m | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/objectivec/GPBExtensionRegistry.m b/objectivec/GPBExtensionRegistry.m index a191dace..4f234f55 100644 --- a/objectivec/GPBExtensionRegistry.m +++ b/objectivec/GPBExtensionRegistry.m @@ -28,7 +28,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#import "GPBExtensionRegistry_PackagePrivate.h" +#import "GPBExtensionRegistry.h" #import "GPBBootstrap.h" #import "GPBDescriptor.h" @@ -52,6 +52,14 @@ [super dealloc]; } +- (instancetype)copyWithZone:(NSZone *)zone { + GPBExtensionRegistry *result = [[[self class] allocWithZone:zone] init]; + if (result && mutableClassMap_.count) { + [result->mutableClassMap_ addEntriesFromDictionary:mutableClassMap_]; + } + return result; +} + - (NSMutableDictionary *)extensionMapForContainingType: (GPBDescriptor *)containingType { NSMutableDictionary *extensionMap = |