[Bf-python] Re: Vector convenienve patch [committed]

Stephen Swaney sswaney at centurytel.net
Sun Jan 23 18:34:47 CET 2005


On Sun, Jan 23, 2005 at 06:10:44PM +0100, Yann Vernier wrote:
> On Tue, Jan 04, 2005 at 09:35:51AM +0100, Yann Vernier wrote:
> > After getting errors countless times from the Mathutils.Vector
> > constructor function, I got a bit fed up and decided to make it less
> > picky. After all, there's no reason for it not to accept tuples, or
> > vectors for that matter. I modified it to accept either a sequence of
> > 2-4 float-compatible arguments or a sequence containing that. This also
> > removes a memory leak present in the old version, where the interface
> > for newVectorObject was misunderstood.
> 
> python/api2_2x/Mathutils.c revision 1.6 now has this change checked in.

source/blender/python/api2_2x/Mathutils.c: In function `M_Mathutils_Vector':
source/blender/python/api2_2x/Mathutils.c:281: warning: ISO C89 forbids mixed declarations and code

This will break on irix and some microsoft platforms.

Apologies for not getting this committed earlier.  I got distracted
messing with gcc.  By default gcc runs in C89 + GNU extensions mode.
This allows c++ comments and mixed code and declarations.  Most of our
platforms can handle the c++ comments with appropriate flags, but they
still choke on the mixed code and declarations.

I suggest using the -pedantic flag when compiling with gcc.  This will
complain over and over about the c++ comments but you can grep for
'mixed declarations' in the compiler output log.


-- 
Stephen Swaney			
sswaney at centurytel.net




More information about the Bf-python mailing list