mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
dcf4ac31ea
commit
43fb5c926a
3 changed files with 332 additions and 251 deletions
|
@ -107,8 +107,12 @@ extern fastImp _fastImp; /* Populated by _fastBuildCache() */
|
||||||
*/
|
*/
|
||||||
extern void _fastBuildCache();
|
extern void _fastBuildCache();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fast access to class info - DON'T pass nil to these!
|
* 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
|
static INLINE BOOL
|
||||||
|
@ -158,6 +162,29 @@ fastInstanceIsKindOfClass(NSObject *obj, Class c)
|
||||||
return fastClassIsKindOfClass(ic, 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)
|
* fastZone(NSObject *obj)
|
||||||
|
|
|
@ -93,9 +93,15 @@
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
NSObject *o;
|
NSObject *o;
|
||||||
long int i;
|
Class c;
|
||||||
|
int i;
|
||||||
|
unsigned I;
|
||||||
|
long l;
|
||||||
|
unsigned long L;
|
||||||
void *p;
|
void *p;
|
||||||
unsigned u;
|
const void *P;
|
||||||
|
char *s;
|
||||||
|
const char *S;
|
||||||
} FastMapItem;
|
} FastMapItem;
|
||||||
|
|
||||||
typedef struct _FastMapTable FastMapTable_t;
|
typedef struct _FastMapTable FastMapTable_t;
|
||||||
|
|
546
Source/NSData.m
546
Source/NSData.m
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue