Some questions about C extensions
Alex
cut_me_out at hotmail.com
Thu Jun 8 09:01:23 EDT 2000
Thanks for the advice about PyArg_ParseTuple, Louis. That cleared
things up a lot.
I think I figured out what's going on with PyTuple_SetItem, by the way.
You don't have to do a Py_INCREF in every case. The thing is, it
doesn't affect the ref. count at all, so if you are putting a newly
created object in there, the reference that object already has will
suffice, but if you are putting in an object that you got from somewhere
else by a process that didn't increase the object's ref count, you need
to increase it explicitly.
Alex.
More information about the Python-list
mailing list