discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libobjc] May I tweak objc-api.h?


From: Greg Parker
Subject: Re: [libobjc] May I tweak objc-api.h?
Date: Fri, 6 Feb 2004 15:33:34 -0800

On Feb 6, 2004, at 2:57 PM, Alexander Malmberg wrote:
Ziemowit Laski wrote:
If you rename 'class' to 'super_class' and reference it as
'super_class',
then this will work in all four of our C flavors, so I'm not sure I
understand
your question...

If we reference the field as "super_class", we won't be compatible with
gcc <= 3.4. That isn't an option for GNUstep.

How many places does GNUstep actually use struct objc_super's fields? If it's only one or two places then it might be easier to move the conditional to GNUstep's source.

#if __GCC_VERSION__ >= 3.5   // or however you spell this
   my_objc_super->super_class = foo;
#else
   my_objc_super->class = foo;
#endif

The choice seems to be compiler-version-check (for those who want to build on an older compiler) versus language-check (for those who want to build on both ObjC and ObjC++).

Of course, objc_super itself is used in so few places that it probably doesn't matter either way.


--
Greg Parker     gparker@apple.com    Runtime Wrangler





reply via email to

[Prev in Thread] Current Thread [Next in Thread]