24 #ifndef __GNUSTEP_GNUSTEP_H_INCLUDED_
25 #define __GNUSTEP_GNUSTEP_H_INCLUDED_
29 #if !defined( MAC_OS_X_VERSION_10_5 )
30 #define NSUInteger unsigned
33 #define AUTORELEASE(object) [object autorelease]
34 #define TEST_AUTORELEASE(object) ({ if (object) [object autorelease]; })
36 #define RELEASE(object) [object release]
37 #define TEST_RELEASE(object) ({ if (object) [object release]; })
39 #define RETAIN(object) [object retain]
40 #define TEST_RETAIN(object) ({ if (object) [object retain]; })
42 #define ASSIGN(object,value) ({\
43 id __value = (id)(value); \
44 id __object = (id)(object); \
45 if (__value != __object) \
52 if (__object != nil) \
59 #define ASSIGNCOPY(object,value) ASSIGN(object, [[value copy] autorelease]);
61 #define DESTROY(object) ({ \
70 #define CREATE_AUTORELEASE_POOL(X) \
71 NSAutoreleasePool *(X) = [NSAutoreleasePool new]
73 #define NSLocalizedString(key, comment) \
74 [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]
76 #define _(X) NSLocalizedString (X, nil)
79 #define NSLocalizedStaticString(X, Y) X