On Mon, 21 Apr 2008 17:09:57 -0700 (PDT)
sturlamolden <[EMAIL PROTECTED]> wrote:
> Albeit not having looked at your code in detail, I'm wiling to bet you
> have one of the refcounts wrong.
It turns out you are correct. I forgot to increment the refcount on the
value extracted from the dict (since
Mitko Haralanov <[EMAIL PROTECTED]> 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]
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 22, 2:00 am, Mitko Haralanov <[EMAIL PROTECTED]> wrote:
> As far as I know, I have done everything by the book yet I can't seem
> to figure out where the problem is. Any help would be great?
Albeit not having looked at your code in detail, I'm wiling to bet you
have one of the refcounts wr
I have a Python module that I have written using the C API and I am
having a problem accessing a dictionary from that module.
Here is what I have done:
1. In my init function I call
module = Py_InitModule ("name", methods);
2. then I get the module's __dict__ structure:
dict = PyMo