[Bf-committers] CVS Python assert failure on shutdown?

Ken Hughes khughes at pacific.edu
Tue Mar 20 19:59:11 CET 2007


Stephen Swaney wrote:
> PyDict_SetItemString( dict, "name", PyObject*) is a relatively new convenience
>  feature in the  C API.  Its purpose is to add a string key to a dict with
> out leaking the oh-so-handy PyString_FromString( "name") you need for
> PyDict_SetItem().
> 
> Our version, EXPP_dict_set_item_str(), is a bit bastardized in that
> it decrefs the last param.

I added it because there were many places we were doing things like:
PyDict_SetItemString(dict, "str", PyInt_FromLong(val));
which left an extra reference lying around

> question: I thought we were not using Blender.Main as a module name?
> 
>   from Main.c:
>       submodule = Py_InitModule3( "Blender.Main", NULL, M_Main_doc );

Yeah, and I think the preference also wasn't to have the bpy module 
automatically imported.  So my fix will be moot shortly anyway :-)

Ken


More information about the Bf-committers mailing list