From b1eb86d5b4a823fa6b10ae99b9e1a4a6d677a447 Mon Sep 17 00:00:00 2001 From: rfm Date: Sat, 19 Feb 2011 17:46:45 +0000 Subject: [PATCH] simplify a little git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32229 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 20 ++++++++++++++------ Source/GSFFCallInvocation.m | 4 ++-- Source/common.h | 19 ------------------- 3 files changed, 16 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25e30c983..d709445f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,20 @@ +2011-02-19 Richard Frith-Macdonald + + * 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 * 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 diff --git a/Source/GSFFCallInvocation.m b/Source/GSFFCallInvocation.m index 8117bd85d..1d28d49af 100644 --- a/Source/GSFFCallInvocation.m +++ b/Source/GSFFCallInvocation.m @@ -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) { diff --git a/Source/common.h b/Source/common.h index 07dc3f92e..095642548 100644 --- a/Source/common.h +++ b/Source/common.h @@ -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);