[Python-Dev] Py_Buffer and pep3118 (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Fri Jul 9 15:17:36 CEST 2010
- Previous message: [Python-Dev] Py_Buffer and pep3118
- Next message: [Python-Dev] A grammatical oddity: trailing commas in argument lists.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 9 Jul 2010 08:38:53 +0000 Kristján Valur Jónsson <kristjan at ccpgames.com> wrote:
In short, what the documentation fails to mention (and the pep) is whether posessing a locked PyBuffer structure also constitutes holding a reference to the exporting object?
It does.
I think it does, but is this guaranteed to be so?
Now that's a good question. This was changed so that every producer of tp_buffer doesn't have to do it by itself. In any case, acquiring the buffer means it will be valid until it is released, which is what you should primarily care about.
Also, is the PyBufferRelease() guaranteed to be "safe" to call multiple times (as the current implementation is)?
It's not, but we could make it so.
Regards
Antoine.
- Previous message: [Python-Dev] Py_Buffer and pep3118
- Next message: [Python-Dev] A grammatical oddity: trailing commas in argument lists.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]