[Python-Dev] New Unicode Snapshot

M.-A. Lemburg mal@lemburg.com
Tue, 08 Feb 2000 15:24:12 +0100


Fredrik Lundh wrote:
> 
> Tim Peters wrote:
> > [M.-A. Lemburg]
> > > ...
> > > Also new in this snapshot is configuration code which figures
> > > out the byte order on the installation machine... I looked
> > > everywhere in the Python source code but couldn't find any
> > > hint whether this was already done in some place,
> >
> > There's a tiny bit of inline code for this in the "host byte order" case of
> > structmodule.c's function whichtable.  It's easy to figure out, so probably
> > better to copy that than create new ifdef symbols for autoconf to screw up
> > <wink>.
> 
> otoh, figuring out the byte order is one of the things
> autoconf do very well.  if they're not there already,
> Python's autoconf should include the basic "platform
> metrics" macros:
> 
> AC_HEADER_STDC
> AC_C_INLINE
> AC_C_BIGENDIAN
> AC_CHECK_SIZEOF(char)
> AC_CHECK_SIZEOF(short)
> AC_CHECK_SIZEOF(int)
> AC_CHECK_SIZEOF(long)
> AC_CHECK_SIZEOF(float)
> AC_CHECK_SIZEOF(double)
> AC_C_CONST
> 
> (think "extension writers", not necessarily "python core")

Should I add these, Guido ? -- I'd rather stick with predefined
macros than cook my own.

The AC_C_INLINE would be esp. interesting here:
I think this could be used a lot for those tiny function which
just apply a type check and then return some object attribute
value.

The AC_C_CONST frightens me a bit: the Unicode code uses "const"
a lot to make sure compilers can do the right optimizations. Are
there compilers out there which do not handle "const" correctly ?

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/