Segfault accessing dictionary in C Python module

Mark Wooding mdw at distorted.org.uk
Tue Apr 22 08:47:26 EDT 2008


Mitko Haralanov <mitko at qlogic.com> wrote:

> 	value = PyDict_GetItem (new_dict, key);

You're not calling Py_DECREF on this value are you?  That's a no-no,
since you're borrowing the dictionary's reference.

-- [mdw]



More information about the Python-list mailing list