diff --git a/Test/ConstantString.m b/Test/ConstantString.m index 8d3811c..4e7f720 100644 --- a/Test/ConstantString.m +++ b/Test/ConstantString.m @@ -1,19 +1,10 @@ #import "Test.h" #include -@interface NSConstantString : Test -{ - const char * const str; - const unsigned int len; -} -- (unsigned int)length; -- (const char*)cString; -@end - @implementation NSConstantString - (unsigned int)length { - return len; + return length; } - (const char*)cString { diff --git a/Test/Test.h b/Test/Test.h index e455aaa..36a5a2b 100644 --- a/Test/Test.h +++ b/Test/Test.h @@ -23,6 +23,27 @@ __attribute__((objc_root_class)) #endif @end +#ifdef __OBJC_GNUSTEP_RUNTIME_ABI__ +# if __OBJC_GNUSTEP_RUNTIME_ABI__ >= 20 +# define NEW_ABI +# endif +#endif + +@interface NSConstantString : Test +{ +#ifdef NEW_ABI + uint32_t flags; + uint32_t length; + uint32_t size; + uint32_t hash; + const char * const str; +#else + const char * const str; + const unsigned int length; +#endif +} +@end + @interface NSAutoreleasePool : Test @end diff --git a/Test/Test.m b/Test/Test.m index 87bfcae..9edf209 100644 --- a/Test/Test.m +++ b/Test/Test.m @@ -8,3 +8,5 @@ #define SINGLE_FILE_TEST 1 #endif #include "Test.h" + +@implementation NSConstantString @end