PySequence_SetItem
John Machin
sjmachin at lexicon.net
Wed Aug 16 16:45:44 EDT 2006
Bill Pursell wrote:
> Bill Pursell wrote:
>
> Also note that the problem goes away if I replace
> the call to PySequence_SetItem with:
> PySequence_SetItem(l, 0, PyInt_FromLong(1L));
Are you sure? It should make absolutely no difference.
My experience so far:
1. crashes in call to PySequence_SetItem
2. removed py_DECREF, s/Sequence/List/ -> works OK
3. added code to test return value from PyWhatever_SetItem [you should
*always* test for error], s/Sequence/Object/ -> PyObject_SetItem call
returns -1, PyErr_Print -> "SystemError: null argument to internal
routine"
Looks like a bug or two. I'll rummage a bit more.
Cheers,
John
More information about the Python-list
mailing list