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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to