[issue8946] PyBuffer_Release signature in 3.1 documentation is incorrect
New submission from Dave Opstad <dave.opstad@monotypeimaging.com>: According to the 3.1 documentation, the prototype for PyBuffer_Release is: void PyBuffer_Release(PyObject *obj, Py_buffer *view); However, abstract.h has this prototype: PyAPI_FUNC(void) PyBuffer_Release(Py_buffer *view); The documentation's reference to "obj" should be removed. ---------- assignee: docs@python components: Documentation messages: 107342 nosy: docs@python, opstad priority: normal severity: normal status: open title: PyBuffer_Release signature in 3.1 documentation is incorrect type: behavior versions: Python 3.1 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8946> _______________________________________
Brian Curtin <curtin@acm.org> added the comment: Fixed in r81851 (py3k) and r81852 (release31-maint). Thanks! ---------- assignee: docs@python -> brian.curtin nosy: +brian.curtin resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8946> _______________________________________
Kristján Valur Jónsson <kristjan@ccpgames.com> added the comment: The documentation issue appears present in 2.7 (and 2.6). Further, the Py_buffer member 'obj' is undocumented, and the in-line comment in object.h falsely states that it is a "borrowed" reference, whereas PyBuffer_Release() Py_XDECREFs it and clears it. Thus, it is also safe to call PyBuffer_Release() more than once, something that can be useful for certain error scenarios. PEP 3118 also has not been updated to reflect the above. ---------- nosy: +krisvale _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8946> _______________________________________
participants (3)
-
Brian Curtin
-
Dave Opstad
-
Kristján Valur Jónsson