This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PyBuffer_Release signature in 3.1 documentation is incorrect
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.1, Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brian.curtin Nosy List: brian.curtin, docs@python, kristjan.jonsson, opstad
Priority: normal Keywords:

Created on 2010-06-08 20:25 by opstad, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg107342 - (view) Author: Dave Opstad (opstad) Date: 2010-06-08 20:25
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.
msg107359 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-06-08 22:32
Fixed in r81851 (py3k) and r81852 (release31-maint). Thanks!
msg109594 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2010-07-08 20:33
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.
History
Date User Action Args
2022-04-11 14:57:02adminsetgithub: 53192
2010-07-08 20:33:02kristjan.jonssonsetnosy: + kristjan.jonsson
messages: + msg109594
2010-06-08 22:32:06brian.curtinsetstatus: open -> closed

assignee: docs@python -> brian.curtin
versions: + Python 3.2
nosy: + brian.curtin

messages: + msg107359
resolution: fixed
stage: resolved
2010-06-08 20:25:44opstadcreate