Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I haven't yet studied the patch in detail but I have a few questions:
(1) are you sure it is safe not to INCREF the obj pointer in the Py_buffer? in the cases handled by your patch we still hold a reference to the original args tuple and dict before calling PyBuffer_Release(), but some functions may want to store the Py_buffer object somewhere to re-use it later. It would seem more logical for PyBuffer_FillInfo to INCREF the obj, and for PyBuffer_Release to DECREF it and set it to NULL. (2) is it necessary to call directly bf_getbuffer & the like or is there a higher-level API to do it? (3) didn't you forget to convert "PyArg_ParseTuple(args, "s#iO:sendto", [...])" in sock_sendto? (4) is it really necessary to do a special case with PyString_Check() rather than rely on the string type's getbuffer method? _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3139> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com