Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyBuffer_Release signature in 3.1 documentation is incorrect #53192

Closed
opstad mannequin opened this issue Jun 8, 2010 · 3 comments
Closed

PyBuffer_Release signature in 3.1 documentation is incorrect #53192

opstad mannequin opened this issue Jun 8, 2010 · 3 comments
Assignees
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@opstad
Copy link
Mannequin

opstad mannequin commented Jun 8, 2010

BPO 8946
Nosy @kristjanvalur, @briancurtin

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/briancurtin'
closed_at = <Date 2010-06-08.22:32:06.823>
created_at = <Date 2010-06-08.20:25:44.783>
labels = ['type-bug', 'docs']
title = 'PyBuffer_Release signature in 3.1 documentation is incorrect'
updated_at = <Date 2010-07-08.20:33:02.245>
user = 'https://bugs.python.org/opstad'

bugs.python.org fields:

activity = <Date 2010-07-08.20:33:02.245>
actor = 'kristjan.jonsson'
assignee = 'brian.curtin'
closed = True
closed_date = <Date 2010-06-08.22:32:06.823>
closer = 'brian.curtin'
components = ['Documentation']
creation = <Date 2010-06-08.20:25:44.783>
creator = 'opstad'
dependencies = []
files = []
hgrepos = []
issue_num = 8946
keywords = []
message_count = 3.0
messages = ['107342', '107359', '109594']
nosy_count = 4.0
nosy_names = ['kristjan.jonsson', 'brian.curtin', 'docs@python', 'opstad']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue8946'
versions = ['Python 3.1', 'Python 3.2']

@opstad
Copy link
Mannequin Author

opstad mannequin commented Jun 8, 2010

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.

@opstad opstad mannequin assigned docspython Jun 8, 2010
@opstad opstad mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Jun 8, 2010
@briancurtin
Copy link
Member

Fixed in r81851 (py3k) and r81852 (release31-maint). Thanks!

@kristjanvalur
Copy link
Mannequin

kristjanvalur mannequin commented Jul 8, 2010

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant