mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix for MacOS-X compatibility accessing ivars directly
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26312 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6e89e23210
commit
3ccc51710e
2 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,8 @@
|
|||
* Source/NSArray.m:
|
||||
* Source/NSSet.m:
|
||||
Add ([-valueForKeyPath:]) to implement KVC aggregate operators.
|
||||
* Source/NSKeyValueCoding.m: When accessing instance variable directly
|
||||
look for _var before var as in MacOS-X
|
||||
|
||||
2008-03-14 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
|
|
|
@ -206,10 +206,10 @@ static id ValueForKey(NSObject *self, const char *key, unsigned size)
|
|||
{
|
||||
buf[4] = lo;
|
||||
buf[3] = '_';
|
||||
name = &buf[4]; // key
|
||||
name = &buf[3]; // _key
|
||||
if (GSObjCFindVariable(self, name, &type, &size, &off) == NO)
|
||||
{
|
||||
name = &buf[3]; // _key
|
||||
name = &buf[4]; // key
|
||||
GSObjCFindVariable(self, name, &type, &size, &off);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue