[Python-Dev] Re: [Python-checkins] python/dist/src/Objects dictobject.c,2.127,2.128 floatobject.c,2.113,2.114 intobject.c,2.84,2.85 listobject.c,2.120,2.121 longobject.c,1.119,1.120 rangeobject.c,2.42,2.43 stringobject.c,2.169,2.170 tupleobject.c,2.69,2.70 typeobject.c,2.160,2.161 unicodeobject.c,2.155,2.156 xxobject.c,2.20,2.21

M.-A. Lemburg mal@lemburg.com
Wed, 17 Jul 2002 18:55:36 +0200


jhylton@users.sourceforge.net wrote:
> Update of /cvsroot/python/python/dist/src/Objects
> In directory usw-pr-cvs1:/tmp/cvs-serv17711/Objects
> 
> Modified Files:
> 	dictobject.c floatobject.c intobject.c listobject.c 
> 	longobject.c rangeobject.c stringobject.c tupleobject.c 
> 	typeobject.c unicodeobject.c xxobject.c 
> Log Message:
> staticforward bites the dust.
> 
> The staticforward define was needed to support certain broken C
> compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
> static keyword when it was used with a forward declaration of a static
> initialized structure.  Standard C allows the forward declaration with
> static, and we've decided to stop catering to broken C compilers.  (In
> fact, we expect that the compilers are all fixed eight years later.)

You'd think so :-) From a support file of the mx tools:

/* --- Platform or compiler specific tweaks ------------------------------- */

/* Add some platform specific symbols to enable work-arounds for the
    static forward declaration of type definitions; note that the GNU C
    compiler does not have this problem.

    Many thanks to all who have contributed to this list.

*/
#if (!defined(__GNUC__))
# if (defined(NeXT) || defined(sgi) || defined(_AIX) ||
      (defined(__osf__) && defined(__DECC)) || defined(TrueComaq64) || defined(__VMS))
#  define BAD_STATIC_FORWARD
# endif
#endif

/* Some more tweaks for various platforms. */

/* VMS needs this define. Thanks to Jean-Fran?ois PI?RONNE */
#if defined(__VMS)
# define __SC__
#endif

/* xlC on AIX doesn't like the Python work-around for static forwards
    in ANSI mode (default), so we switch on extended mode. Thanks to
    Albert Chin-A-Young */
#if defined(__xlC__)
# pragma langlvl extended
#endif

> I'm leaving staticforward and statichere defined in object.h as
> static.  This is only for backwards compatibility with C extensions
> that might still use it.



-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/