simplify a little

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32229 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-02-19 17:46:45 +00:00
parent 71905252e5
commit b9b50a9fef
3 changed files with 16 additions and 27 deletions

View file

@ -1,12 +1,20 @@
2011-02-19 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSFFCallInvocation.m: Updated two obsolete runtime calls
* Source/common.h: Revert last change as it seemed pointless to
define macros within a private header which reproduce functions
we don't actually use (or want to use) within base. I think/hope
that the tiny change to GSFFcallInvocation.m is all that was needed.
2011-02-19 16:02 David Chisnall <theraven@gna.org>
* libs/base/trunk/Source/common.h: Add some macros that map some
libobjc functions to their runtime-specific variants. This avoids the
need for ugly #ifdefs everywhere (the next commit will try to clean up
some of this mess), and lets us use the _np function names everywhere to
explicitly note that we are using runtime functions that are not present
on OS X - apparently the new GCC runtime does not add this suffix for
some reason.
libobjc functions to their runtime-specific variants.
This avoids the need for ugly #ifdefs everywhere (the next commit
will try to clean up some of this mess), and lets us use the _np
function names everywhere to explicitly note that we are using
runtime functions that are not present on OS X - apparently the
new GCC runtime does not add this suffix for some reason.
2011-02-16 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -919,10 +919,10 @@ GSInvocationCallback (void *callback_data, va_alist args)
{
const char *runtimeName = sel_getName(selector);
selector = sel_get_typed_uid (runtimeName, receiverTypes);
selector = sel_getType_np(runtimeName, receiverTypes);
if (selector == 0)
{
selector = sel_register_typed_name (runtimeName, receiverTypes);
selector = sel_registerTypedName_np(runtimeName, receiverTypes);
}
if (runtimeTypes != 0)
{

View file

@ -57,24 +57,5 @@
#define objc_free(x) free(x)
#endif
/*
* If we are not using the NeXT runtime, we are able to use typed selectors.
* Unfortunately, the APIs for doing so differ between runtimes. The old GCC
* runtime used lower-case function names with underscore separation. The
* GNUstep runtime adopts the Apple runtime API naming convention, but suffixes
* non-portable functions with _np to warn against their use where OS X
* compatibility is required. The newer GCC runtime uses the Apple convention,
* but does not add the _np suffix, making it unclear that the calls are not
* portable.
*
* These macros allow the GNUstep runtime versions to be used everywhere, so
* the _np suffix explicitly annotates the code as not compatible with the NeXT
* and Mac runtimes.
*/
#ifdef __GNU_LIBOBJC__
# define sel_getType_np sel_getTypeEncoding
# define sel_registerTypedName_np sel_registerTypedName
#endif
// Semi-private GNU[step] runtime function.
IMP get_imp(Class, SEL);