You are right! I added
Py_INCREF(pDict);
right behind
pDict = PyDict_New();
it seems to work correctly.
thanks,
zz
-Original Message-
From: [EMAIL PROTECTED] on behalf of Gabriel Genellina
Sent: Thu 3/8/2007 7:15 PM
To: python-list@python.org
Subject: Re: list of dictionary in
En Thu, 08 Mar 2007 22:26:59 -0300, ZiZi Zhao <[EMAIL PROTECTED]> escribió:
> I tried to build a list of dictionaries using embedded Python2.5
> in the following way to append dictionaries to a list.
>
> Py_Object *pList = PyList_New(0);
>
> for (i=0; i Py_Object *pDict = PyDict_New();
> /