On Fri, 9 Jul 2010 08:38:53 +0000 Kristján Valur Jónsson <krist...@ccpgames.com> wrote: > > 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?
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 PyBuffer_Release() guaranteed to be "safe" to call > multiple times (as the current implementation is)? It's not, but we could make it so. Regards Antoine. _______________________________________________ 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