mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 09:41:15 +00:00
add code for other runtimes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32413 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6ae45ff3f3
commit
40e6fedf16
2 changed files with 18 additions and 6 deletions
|
@ -281,18 +281,19 @@ GS_EXPORT SEL
|
|||
GSSelectorFromName(const char *name);
|
||||
|
||||
/**
|
||||
* Return the selector for the specified name and types. Returns a nul
|
||||
* pointer if the name is nul. Uses any available selector if the types
|
||||
* argument is nul. <br />
|
||||
* Creates a new selector if necessary.
|
||||
* Return the selector for the specified name and types.<br />
|
||||
* Returns a nul pointer if the name is nul.<br />
|
||||
* Creates a new selector if necessary.<br />
|
||||
* Code must NOT rely on this providing a selector with type information.
|
||||
*/
|
||||
GS_EXPORT SEL
|
||||
GSSelectorFromNameAndTypes(const char *name, const char *types);
|
||||
|
||||
/**
|
||||
* Return the type information from the specified selector.
|
||||
* Return the type information from the specified selector.<br />
|
||||
* May return a nul pointer if the selector was a nul pointer or if it
|
||||
* was not typed.
|
||||
* was not typed (or if the runtime does not support typed selectors).<br />
|
||||
* Code must NOT rely on this providing any type information.
|
||||
*/
|
||||
GS_EXPORT const char *
|
||||
GSTypesFromSelector(SEL sel);
|
||||
|
|
|
@ -137,11 +137,16 @@ GSSelectorFromName(const char *name)
|
|||
{
|
||||
return sel_getUid(name);
|
||||
}
|
||||
|
||||
SEL
|
||||
GSSelectorFromNameAndTypes(const char *name, const char *types)
|
||||
{
|
||||
#if NeXT_RUNTIME
|
||||
return sel_getUid(name);
|
||||
#elif defined (__GNU_LIBOBJC__)
|
||||
return sel_registerTypedName(name, types);
|
||||
#elif defined (__GNUSTEP_RUNTIME__)
|
||||
return sel_registerTypedName_np(name, types);
|
||||
#else
|
||||
if (name == 0)
|
||||
{
|
||||
|
@ -174,11 +179,16 @@ GSSelectorFromNameAndTypes(const char *name, const char *types)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *
|
||||
GSTypesFromSelector(SEL sel)
|
||||
{
|
||||
#if NeXT_RUNTIME
|
||||
return 0;
|
||||
#elif defined (__GNU_LIBOBJC__)
|
||||
return sel_getTypes(name);
|
||||
#elif defined (__GNUSTEP_RUNTIME__)
|
||||
return sel_getType_np(name);
|
||||
#else
|
||||
if (sel == 0)
|
||||
{
|
||||
|
@ -190,6 +200,7 @@ GSTypesFromSelector(SEL sel)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
GSFlushMethodCacheForClass (Class cls)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue