(original) (raw)
In addition, the PyBufferProcs documentation has not bee updated to reflect the new buffer interface.
From: python-dev-bounces+kristjan=ccpgames.com@python.org
\[mailto:python-dev-bounces+kristjan=ccpgames.com@python.org\] On Behalf Of Kristj�n
Valur J�nsson
Sent: 9\. j�l� 2010 08:39
To: Python-Dev
Subject: \[Python-Dev\] Py\_Buffer and pep3118
Hello there.
I�m in the process of upgrading code to use python 2.7 and the new Py\_Buffer objects. I have, however, come across an inconsistency in the documentation, both in the pep and the python docs, with the actual implementation.
In addition to the different function signatures mentioned in issue 8946, the Py\_Buffer member ‚obj‘ is undocumented.
The inline comment in object.h mentiones that it is a „borrowed reference“ but this appears inconsistent with the implementation of PyBuffer\_Release().
In short, what the documentation fails to mention (and the pep) is whether posessing a locked Py\_Buffer structure also constitutes holding a reference to the exporting object? I think it does, but is this guaranteed to be so? Also, is the PyBuffer\_Release() guaranteed to be „safe“ to call multiple times (as the current implementation is)?
Kristj�n