From 1dcc329427fd103a0abd96ab787270f5d0a31861 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 21 May 2015 17:14:52 -0400 Subject: 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. --- objectivec/GPBExtensionRegistry.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'objectivec/GPBExtensionRegistry.m') 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 = -- cgit v1.2.3