[Bf-committers] Re: [Bf-blender-cvs] CVS commit:
blender/source/blender/python/api2_2x Geometry.c
blender/release/scripts/bpymodules BPyMesh.py
Martin Poirier
theeth at yahoo.com
Mon Jul 3 05:39:45 CEST 2006
There's some things fishy in there:
In this piece of code:
------------
len_polylines = PySequence_Size( polyLineSeq );
for( i = 0; i < len_polylines; ++i ) {
polyLine= PySequence_GetItem( polyLineSeq, i );
if (!PySequence_Check(polyLineSeq)) {
freedisplist(&dispbase);
Py_DECREF(polyLine);
------------
PySequence_Check should be on polyLine, not
polyLineSeq
Py_DECREF should be Py_XDECREF, since polyLine can be
null if GetItem failed (this doesn't affect
PySequence_Check, which will return 0 in this case).
Also, generally:
You're using the same error message everywhere as
static string. I suggest you define a constant
containing the message and use that instead of
multiple copy/pasted copies. (this applies to the rest
of BPY too, obviously).
Note that I only checked this commit, not whole code,
so you might want to go over the rest again one more
time.
Martin
--- Campbell Barton <cbarton at metavr.com> wrote:
> campbellbarton (Campbell Barton) 2006/07/03 01:09:38
> CEST
>
> Modified files:
> blender/source/blender/python/api2_2x Geometry.c
>
> blender/release/scripts/bpymodules BPyMesh.py
>
> Log:
> Made geometrys polyfill work with all iterators
> (not just lists) and updated bpymeshes ngon to
> ignore polylines with <3 verts.
>
> Revision Changes Path
> 1.3 +29 -21
> blender/source/blender/python/api2_2x/Geometry.c
>
>
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/python/api2_2x/Geometry.c.diff?r1=1.2&r2=1.3&cvsroot=bf-blender>
> 1.26 +3 -1
> blender/release/scripts/bpymodules/BPyMesh.py
>
>
<http://projects.blender.org/viewcvs/viewcvs.cgi/blender/release/scripts/bpymodules/BPyMesh.py.diff?r1=1.25&r2=1.26&cvsroot=bf-blender>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at projects.blender.org
>
http://projects.blender.org/mailman/listinfo/bf-blender-cvs
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Bf-committers
mailing list