mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
* Headers/gnustep/base/GSObjCRuntime.h:
* Source/Additions/GSObjCRuntime.m: Added typedef for GSIVar. (GSCGetInstanceVariableDefinition): New function. (GSObjCGetInstanceVariableDefinition): Ditto. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17168 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
14577e9418
commit
7d060e1290
3 changed files with 63 additions and 2 deletions
|
@ -676,6 +676,33 @@ GSGetClassMethodNotInhertited (Class class, SEL sel)
|
|||
return search_for_method_in_class (class->class_pointer, sel);
|
||||
}
|
||||
|
||||
/* See header for documentation. */
|
||||
GSIVar
|
||||
GSCGetInstanceVariableDefinition(Class class, const char *name)
|
||||
{
|
||||
struct objc_ivar_list *list;
|
||||
int i;
|
||||
list = class->ivars;
|
||||
for (i = 0; i < list->ivar_count; i++)
|
||||
{
|
||||
if (strcmp (list->ivar_list[i].ivar_name, name) == 0)
|
||||
return &(list->ivar_list[i]);
|
||||
}
|
||||
class = GSObjCSuper(class);
|
||||
if (class != 0)
|
||||
{
|
||||
return GSCGetInstanceVariableDefinition(class, name);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
GSIVar
|
||||
GSObjCGetInstanceVariableDefinition(Class class, NSString *name)
|
||||
{
|
||||
return GSCGetInstanceVariableDefinition(class, [name cString]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>A Behavior can be seen as a "Protocol with an implementation" or a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue