New submission from Antoine Pitrou <[EMAIL PROTECTED]>: The declaration for PyObject_ReleaseBuffer (in Include/abstract.h) has the following comments attached to it. But the part about the return value is wrong since the function is defined as returning void. Also, PEP 3118 says it always succeeds so it can't return an error code.
By the way, may I suggest that having the buffer API declared in abstract.h but the Py_buffer struct declared in object.h (and why not in bufferobject.h?) is slightly confusing. /* C-API version of the releasebuffer function call. It checks to make sure the object has the required function pointer and issues the call. The obj must have the buffer interface or this function will cause a segfault (i.e. it is assumed to be called only after a corresponding getbuffer which already verified the existence of the tp_as_buffer pointer). Returns 0 on success and -1 (with an error raised) on failure. This function always succeeds (as a NO-OP) if there is no releasebuffer function for the object so that it can always be called when the consumer is done with the buffer */ ---------- components: Interpreter Core messages: 69303 nosy: pitrou severity: normal status: open title: incorrect comments for PyObject_ReleaseBuffer versions: Python 2.6 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3293> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com