[Python-Dev] Py_Buffer and pep3118 (original) (raw)
Kristján Valur Jónsson kristjan at ccpgames.com
Fri Jul 9 14:55:59 CEST 2010
- Previous message: [Python-Dev] Py_Buffer and pep3118
- Next message: [Python-Dev] Py_Buffer and pep3118
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In addition, the PyBufferProcs documentation has not bee updated to reflect the new buffer interface.
From: python-dev-bounces+kristjan=ccpgames.com at python.org [mailto:python-dev-bounces+kristjan=ccpgames.com at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20100709/00cf1b8d/attachment.html>
- Previous message: [Python-Dev] Py_Buffer and pep3118
- Next message: [Python-Dev] Py_Buffer and pep3118
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]