From 3193a75cb9dd437757b37ec84f5ab953d343e711 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sat, 26 Feb 2011 19:25:15 +0000 Subject: [PATCH] Actually fix C99isms. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32382 72102866-910b-0410-8b05-ffd578937521 --- Source/GSBlocks.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Source/GSBlocks.m b/Source/GSBlocks.m index 5aa692c9e..52894f752 100644 --- a/Source/GSBlocks.m +++ b/Source/GSBlocks.m @@ -12,10 +12,11 @@ void _Block_release(void *); + (void)load { unsigned int methodCount; - Method *m = methods = NULL; + Method *m = NULL; Method *methods = class_copyMethodList(self, &methodCount); id blockClass = objc_lookUpClass("_NSBlock"); + Protocol *nscopying = NULL; // If we don't have an _NSBlock class, we don't have blocks support in the // runtime, so give up. @@ -28,24 +29,24 @@ void _Block_release(void *); class_addMethod(blockClass, method_getName(*m), method_getImplementation(*m), method_getTypeEncoding(*m)); } - Protocol *nscopying = objc_getProtocol("NSCopying"); + nscopying = objc_getProtocol("NSCopying"); class_addProtocol(blockClass, nscopying); } - (id)copyWithZone: (NSZone*)aZone { - return Block_copy(self); + return _Block_copy(self); } - (id)copy { - return Block_copy(self); + return _Block_copy(self); } - (id)retain { - return Block_copy(self); + return _Block_copy(self); } - (void)release { - Block_release(self); + _Block_release(self); } @end