Re: [PATCHES] pl/python refcount bug

2006-01-09 Thread Neil Conway
On Mon, 2006-01-09 at 13:07 -0500, Neil Conway wrote: > The fix is simple: set the local pointer to the current argument to NULL > immediately after adding it to the argument list. This ensures that the > Py_XDECREF() in the PG_CATCH() block doesn't double-decrement. I'd like > to apply this to HEA

[PATCHES] pl/python refcount bug

2006-01-09 Thread Neil Conway
In PLy_function_build_args(), the code loops repeatedly, constructing one argument at a time and then inserting the argument into a Python list via PyList_SetItem(). This "steals" the reference to the argument: that is, the reference to the new list member is now held by the Python list itself. Thi