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

Ziemowit Laski zlaski@apple.com
Fri Feb 6 22:20:00 GMT 2004


On 6 Feb, 2004, at 14.10, Alexander Malmberg wrote:

> Ziemowit Laski wrote:
>> On 6 Feb, 2004, at 14.02, Alexander Malmberg wrote:
>>> Ziemowit Laski wrote:
>>> [snip]
>>>> So, do you think it would be OK to rename 'class' above to, say,
>>>> 'super_class'?
>>>
>>> This field is used in GNUstep. What do you propose that code should 
>>> do
>>> to work with both versions? Change the name only if __cplusplus is
>>> defined?
>>
>> Change the name unconditionally... please? :-)
>
> Only if you can give us a really good answer to the first question. :)
>
> Again: What do you propose that code should do to work with both
> versions?

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...  Or are you suggesting that we do something like

   #ifdef __cplusplus
     Class super_class;
   #else
     Class class;
   #endif

?  While possible, I'd submit that this approach will be more confusing 
in the long run.

--Zem
--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477



More information about the Gcc mailing list