[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.200,2.201

Greg Stein gstein@lyra.org
Thu, 31 Aug 2000 19:12:08 -0700

On Thu, Aug 31, 2000 at 05:02:01PM -0700, Tim Peters wrote:
> Update of /cvsroot/python/python/dist/src/Python
> In directory slayer.i.sourceforge.net:/tmp/cvs-serv20859/python/dist/src/Python
> Modified Files:
> 	ceval.c 
> Log Message:
> Supply missing prototypes for new Py_{Get,Set}RecursionLimit; fixes compiler wngs;
> un-analize Get's definition ("void" is needed only in declarations, not defns, &
> is generally considered bad style in the latter).

wtf? Placing a void in both declaration *and* definition is "good style".

static int foo(void) { ... }
int bar() { ... }

You're setting yourself up for inconsistency if you don't always use a
prototypical definition. In the above example, foo() must be
declared/defined using a prototype (or you get warnings from gcc when you
compile with -Wmissing-prototypes (which is recommended for developers)).
But you're saying bar() should *not* have a prototype.

-1 on dropping the "void" from the definition. I disagree it is bad form,
and it sets us up for inconsistencies.


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