I remember there was something about increasing the reference count of
python objects that are stored by C code without without the notice of
python. But how to achieve this? I thought there was a section in the
cython manual about that but I can't find it.

What I tried is:
cdef extern from "Python.h":
        Py_INCREF(obj)
        Py_DECREF(obj)

Py_INCREF(dataElement)
g_hash_table_insert(mapping, dataWrapper, <gpointer>dataElement)

whereas dataElement is a python object. But this code results in a
segmentation fault in the Py_INCREF statement.

Thanks for the help
Johannes

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to