[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.165,2.166 codecs.c,2.8,2.9 compile.c,2.112,2.113 modsupport.c,2.45

Greg Stein gstein@lyra.org
Tue, 4 Jul 2000 00:35:02 -0700


Placing it there means everybody and their brother will now have to include
it. Personally, I'd rather have the number of headers in my compilation unit
minimized.

Take the argument of "put it into Python.h" to the extreme: why have any
includes in any of the .c files? Put them ALL into Python.h so nobody has to
bother with them in their .c files.

:-)

Cheers,
-g

On Tue, Jul 04, 2000 at 09:10:08AM +0200, Vladimir Marangozov wrote:
> 
> This HAVE_LIMITS_H define spans over several files already.
> Why not putting it in Python.h and cleanup the rest?
> 
> Jack Jansen wrote:
> > 
> > Update of /cvsroot/python/python/dist/src/Python
> > In directory slayer.i.sourceforge.net:/tmp/cvs-serv29235/Python
> > 
> > Modified Files:
> > 	bltinmodule.c codecs.c compile.c modsupport.c 
> > Log Message:
> > Include limits.h if we have it.
> > 
> > 
> > Index: bltinmodule.c
> > ===================================================================
> > RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
> > retrieving revision 2.165
> > retrieving revision 2.166
> > diff -C2 -r2.165 -r2.166
> > *** bltinmodule.c	2000/06/30 23:58:05	2.165
> > --- bltinmodule.c	2000/07/03 21:39:47	2.166
> > ***************
> > *** 24,27 ****
> > --- 24,30 ----
> >   #include <unistd.h>
> >   #endif
> > + #ifdef HAVE_LIMITS_H
> > + #include <limits.h>
> > + #endif
> >   
> >   /* Forward */
> > 
> > Index: codecs.c
> > ===================================================================
> > RCS file: /cvsroot/python/python/dist/src/Python/codecs.c,v
> > retrieving revision 2.8
> > retrieving revision 2.9
> > diff -C2 -r2.8 -r2.9
> > *** codecs.c	2000/06/29 14:50:15	2.8
> > --- codecs.c	2000/07/03 21:39:47	2.9
> > ***************
> > *** 11,14 ****
> > --- 11,17 ----
> >   #include "Python.h"
> >   #include <ctype.h>
> > + #ifdef HAVE_LIMITS_H
> > + #include <limits.h>
> > + #endif
> >   
> >   /* --- Globals ------------------------------------------------------------ */
> > 
> > Index: compile.c
> > ===================================================================
> > RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
> > retrieving revision 2.112
> > retrieving revision 2.113
> > diff -C2 -r2.112 -r2.113
> > *** compile.c	2000/06/30 23:58:06	2.112
> > --- compile.c	2000/07/03 21:39:47	2.113
> > ***************
> > *** 34,37 ****
> > --- 34,40 ----
> >   
> >   #include <ctype.h>
> > + #ifdef HAVE_LIMITS_H
> > + #include <limits.h>
> > + #endif
> >   
> >   /* Three symbols from graminit.h are also defined in Python.h, with
> > 
> > Index: modsupport.c
> > ===================================================================
> > RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v
> > retrieving revision 2.45
> > retrieving revision 2.46
> > diff -C2 -r2.45 -r2.46
> > *** modsupport.c	2000/06/30 23:58:06	2.45
> > --- modsupport.c	2000/07/03 21:39:47	2.46
> > ***************
> > *** 12,15 ****
> > --- 12,18 ----
> >   
> >   #include "Python.h"
> > + #ifdef HAVE_LIMITS_H
> > + #include <limits.h>
> > + #endif
> >   
> >   #ifdef MPW /* MPW pushes 'extended' for float and double types with varargs */
> > 
> > 
> > _______________________________________________
> > Python-checkins mailing list
> > Python-checkins@python.org
> > http://www.python.org/mailman/listinfo/python-checkins
> > 
> 
> 
> -- 
>        Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
> http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252
> 
> _______________________________________________
> Python-checkins mailing list
> Python-checkins@python.org
> http://www.python.org/mailman/listinfo/python-checkins

-- 
Greg Stein, http://www.lyra.org/