[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/python BPY_interface.c blender/source/blender/python/api2_2xBone.c
Daniel Dunbar
bf-committers@blender.org
Wed, 5 May 2004 07:14:09 -0700 (PDT)
> > Log:
> > - PyInt_AsLong() was called on a possibly NULL object, this may be
> > a checked error but is no good anyway
>
> After looking at the actual Python sources, the code you replaced
> here does exactly the same thing as your changes. Your version
> is more obvious, but the result appears to be identical.
> Py_XDECREF() decremetents the refcount of a possibly null object.
No, the old version could call PyInt_AsLong(NULL), the new version
will not.
> > - On syntax errors the python global dictionary was being free'd
> > twice. AGH!!! again
>
> The dictionary gets released in both branches of the if clause.
> The line you removed zeroed out the pointer to the no longer used
> python object that gets created when a script is run again.
Yes, because the python dictionary was getting free'd again underneath
the call to free_script.
=====
daniel dunbar
daniel@zuster.org