mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
3c33653bdb
commit
b680aec6ee
3 changed files with 332 additions and 251 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
546
Source/NSData.m
546
Source/NSData.m
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue