Minor extensions and bug fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3087 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1998-10-20 14:40:05 +00:00
parent 3c33653bdb
commit b680aec6ee
3 changed files with 332 additions and 251 deletions

View file

@ -107,8 +107,12 @@ extern fastImp _fastImp; /* Populated by _fastBuildCache() */
*/
extern void _fastBuildCache();
/*
* Fast access to class info - DON'T pass nil to these!
* These should really do different things conditional upon the objc
* runtime in use, but we will probably only ever want to support the
* latest GNU runtime, so I haven't bothered about that.
*/
static INLINE BOOL
@ -158,6 +162,29 @@ fastInstanceIsKindOfClass(NSObject *obj, Class c)
return fastClassIsKindOfClass(ic, c);
}
static INLINE const char*
fastClassName(Class c)
{
return c->name;
}
static INLINE int
fastClassVersion(Class c)
{
return c->version;
}
static INLINE const char*
fastSelectorName(SEL s)
{
return sel_get_name(s);
}
static INLINE const char*
fastSelectorTypes(SEL s)
{
return sel_get_type(s);
}
/*
* fastZone(NSObject *obj)

View file

@ -93,9 +93,15 @@
typedef union {
NSObject *o;
long int i;
Class c;
int i;
unsigned I;
long l;
unsigned long L;
void *p;
unsigned u;
const void *P;
char *s;
const char *S;
} FastMapItem;
typedef struct _FastMapTable FastMapTable_t;

File diff suppressed because it is too large Load diff