mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
NSKVOSupport: Prevent invoking any forwarding mechanisms when looking for keypaths
This commit is contained in:
parent
35c7188b7a
commit
a13f584c94
1 changed files with 8 additions and 4 deletions
|
@ -720,10 +720,14 @@ static void *s_kvoObservationInfoAssociationKey; // has no value; pointer used
|
|||
free(selectorName);
|
||||
}
|
||||
|
||||
if ([self respondsToSelector:sel])
|
||||
{
|
||||
return ((NSSet *(*)(id, SEL))objc_msgSend)(self, sel);
|
||||
}
|
||||
|
||||
if (class_respondsToSelector(self, sel))
|
||||
{
|
||||
// Look up slot without invoking any forwarding mechanisms
|
||||
// as 'self' is a metaclass
|
||||
struct objc_slot2 *slot = objc_get_slot2(self, sel, NULL);
|
||||
return ((NSSet *(*)(id, SEL))slot->method)(self, sel);
|
||||
}
|
||||
}
|
||||
return emptySet;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue