mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +00:00
Actually fix C99isms.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32382 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1b5248b98a
commit
3193a75cb9
1 changed files with 7 additions and 6 deletions
|
@ -12,10 +12,11 @@ void _Block_release(void *);
|
||||||
+ (void)load
|
+ (void)load
|
||||||
{
|
{
|
||||||
unsigned int methodCount;
|
unsigned int methodCount;
|
||||||
Method *m = methods = NULL;
|
Method *m = NULL;
|
||||||
Method *methods =
|
Method *methods =
|
||||||
class_copyMethodList(self, &methodCount);
|
class_copyMethodList(self, &methodCount);
|
||||||
id blockClass = objc_lookUpClass("_NSBlock");
|
id blockClass = objc_lookUpClass("_NSBlock");
|
||||||
|
Protocol *nscopying = NULL;
|
||||||
|
|
||||||
// If we don't have an _NSBlock class, we don't have blocks support in the
|
// If we don't have an _NSBlock class, we don't have blocks support in the
|
||||||
// runtime, so give up.
|
// runtime, so give up.
|
||||||
|
@ -28,24 +29,24 @@ void _Block_release(void *);
|
||||||
class_addMethod(blockClass, method_getName(*m),
|
class_addMethod(blockClass, method_getName(*m),
|
||||||
method_getImplementation(*m), method_getTypeEncoding(*m));
|
method_getImplementation(*m), method_getTypeEncoding(*m));
|
||||||
}
|
}
|
||||||
Protocol *nscopying = objc_getProtocol("NSCopying");
|
nscopying = objc_getProtocol("NSCopying");
|
||||||
class_addProtocol(blockClass, nscopying);
|
class_addProtocol(blockClass, nscopying);
|
||||||
}
|
}
|
||||||
- (id)copyWithZone: (NSZone*)aZone
|
- (id)copyWithZone: (NSZone*)aZone
|
||||||
{
|
{
|
||||||
return Block_copy(self);
|
return _Block_copy(self);
|
||||||
}
|
}
|
||||||
- (id)copy
|
- (id)copy
|
||||||
{
|
{
|
||||||
return Block_copy(self);
|
return _Block_copy(self);
|
||||||
}
|
}
|
||||||
- (id)retain
|
- (id)retain
|
||||||
{
|
{
|
||||||
return Block_copy(self);
|
return _Block_copy(self);
|
||||||
}
|
}
|
||||||
- (void)release
|
- (void)release
|
||||||
{
|
{
|
||||||
Block_release(self);
|
_Block_release(self);
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue