From c4710ce4f0974b6e655b68a0a6c0489036f8f580 Mon Sep 17 00:00:00 2001 From: ayers Date: Sat, 7 Jun 2003 17:37:02 +0000 Subject: [PATCH] Wrap deprecated API in NO_DEPRICATED macro. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16880 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 1 + Headers/gnustep/base/GSObjCRuntime.h | 101 ++++++++++++++------------- 2 files changed, 54 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b2acc853..c016e6ad6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * Headers/gnustep/base/GSObjCRuntime.h * Source/Additions/GSObjCRuntime.m : White space patch to better conform with GNU coding standards and improve readability. + Wrap deprecated API in NO_DEPRICATED macro. 2003-06-06 David Ayers diff --git a/Headers/gnustep/base/GSObjCRuntime.h b/Headers/gnustep/base/GSObjCRuntime.h index 74de8b311..aea0baad6 100644 --- a/Headers/gnustep/base/GSObjCRuntime.h +++ b/Headers/gnustep/base/GSObjCRuntime.h @@ -111,27 +111,6 @@ GS_EXPORT void GSObjCSetValue(NSObject *self, NSString *key, id val, SEL sel, const char *type, unsigned size, int offset); -/* - * The next five are old (deprecated) names for the same thing. - */ -GS_EXPORT BOOL -GSFindInstanceVariable(id obj, const char *name, - const char **type, unsigned int *size, int *offset); - -GS_EXPORT void -GSGetVariable(id obj, int offset, unsigned int size, void *data); - -GS_EXPORT void -GSSetVariable(id obj, int offset, unsigned int size, const void *data); - -GS_EXPORT id -GSGetValue(NSObject *self, NSString *key, SEL sel, - const char *type, unsigned size, int offset); - -GS_EXPORT void -GSSetValue(NSObject *self, NSString *key, id val, SEL sel, - const char *type, unsigned size, int offset); - #include #define GS_STATIC_INLINE static inline @@ -174,32 +153,6 @@ GSObjCIsKindOf(Class this, Class other) return NO; } -/** ## deprecated ## - */ -GS_STATIC_INLINE const char* -GSObjCName(Class this) -{ - return class_get_class_name(this); -} - -/** ## deprecated ## - */ -GS_STATIC_INLINE const char* -GSObjCSelectorName(SEL this) -{ - if (this == 0) - return 0; - return sel_get_name(this); -} - -/** ## deprecated ## - */ -GS_STATIC_INLINE const char* -GSObjCSelectorTypes(SEL this) -{ - return sel_get_type(this); -} - /** * Given a class name, return the corresponding class or * a nul pointer if the class cannot be found.
@@ -346,6 +299,58 @@ GSLastErrorStr(long error_id); +#ifndef NO_DEPRECATED +/* + * The next five are old (deprecated) names for the same thing. + */ +GS_EXPORT BOOL +GSFindInstanceVariable(id obj, const char *name, + const char **type, unsigned int *size, int *offset); + +GS_EXPORT void +GSGetVariable(id obj, int offset, unsigned int size, void *data); + +GS_EXPORT void +GSSetVariable(id obj, int offset, unsigned int size, const void *data); + +GS_EXPORT id +GSGetValue(NSObject *self, NSString *key, SEL sel, + const char *type, unsigned size, int offset); + +GS_EXPORT void +GSSetValue(NSObject *self, NSString *key, id val, SEL sel, + const char *type, unsigned size, int offset); + +/** ## deprecated ## + */ +GS_STATIC_INLINE const char* +GSObjCName(Class this) +{ + return class_get_class_name(this); +} + +/** ## deprecated ## + */ +GS_STATIC_INLINE const char* +GSObjCSelectorName(SEL this) +{ + if (this == 0) + return 0; + return sel_get_name(this); +} + +/** ## deprecated ## + */ +GS_STATIC_INLINE const char* +GSObjCSelectorTypes(SEL this) +{ + return sel_get_type(this); +} + +#endif /* NO_DEPRECATED */ + + + #ifndef GS_MAX_OBJECTS_FROM_STACK /** * The number of objects to try to get from varargs into an array on @@ -492,6 +497,6 @@ GSLastErrorStr(long error_id); }) -#endif +#endif /* NO_GNUSTEP */ #endif /* __GSObjCRuntime_h_GNUSTEP_BASE_INCLUDE */