There's no need to increase the reference count to
items passed into PyList_SetItem, it already steals a reference.
{
PyObject *item = pygi_source_symbol_new (l->data);
PyList_SetItem (list, i++, item);
- Py_INCREF (item);
}
Py_INCREF (list);
{
PyObject *item = pygi_source_symbol_new (l->data);
PyList_SetItem (list, i++, item);
- Py_INCREF (item);
}
Py_INCREF (list);
PyObject *item = Py_BuildValue ("(ssi)", comment->comment,
comment->filename,
comment->line);
- PyList_SET_ITEM (list, i++, item);
- Py_INCREF (item);
+ PyList_SetItem (list, i++, item);
}
Py_INCREF (list);