mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-19 09:50:43 +00:00
Workaround for gnustep-base DO bug
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@16925 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a35dd9004c
commit
6f349497a5
2 changed files with 18 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
2003 Jun 15
|
||||
|
||||
* NSInvocation+additions: added unknown selector creation
|
||||
* NSInvocation+additions: added unknown selector creation; created a
|
||||
workaround for gnustep DO bug
|
||||
|
||||
2003 May 11 Stefan Urbanek <urbanek@host.sk>
|
||||
|
||||
|
|
|
@ -200,12 +200,14 @@ void STGetValueOfTypeFromObject(void *value, const char *type, id anObject)
|
|||
NSMethodSignature *signature;
|
||||
NSInvocation *invocation;
|
||||
SEL sel;
|
||||
|
||||
BOOL requiresRegistration = NO;
|
||||
|
||||
// NSLog(@"GETTING SELECTOR %@", selectorName);
|
||||
sel = NSSelectorFromString(selectorName);
|
||||
|
||||
if(!sel)
|
||||
{
|
||||
NSLog(@"REG REQIRED");
|
||||
// NSLog(@"REGISTERING SELECTOR");
|
||||
char *name = [selectorName cString];
|
||||
|
||||
sel = sel_register_name(name);
|
||||
|
@ -215,12 +217,23 @@ void STGetValueOfTypeFromObject(void *value, const char *type, id anObject)
|
|||
[NSException raise:STInternalInconsistencyException
|
||||
format:@"Unable to register selector '%@'",
|
||||
selectorName];
|
||||
return NULL;
|
||||
return nil;
|
||||
}
|
||||
requiresRegistration = YES;
|
||||
}
|
||||
|
||||
signature = [target methodSignatureForSelector:sel];
|
||||
|
||||
/* FIXME: this is workaround for gnustep DO bug (hight priority) */
|
||||
|
||||
if(requiresRegistration)
|
||||
{
|
||||
// NSLog(@"REGISTERING SELECTOR TYPES");
|
||||
sel = sel_register_typed_name([selectorName cString], [signature methodReturnType]);
|
||||
// NSLog(@"REGISTERED %@", NSStringFromSelector(sel));
|
||||
|
||||
}
|
||||
|
||||
if(!signature)
|
||||
{
|
||||
[NSException raise:STInternalInconsistencyException
|
||||
|
|
Loading…
Reference in a new issue