[Python-Dev] Assertion in _PyManagedBuffer_FromObject()

Stefan Krah stefan at bytereef.org
Fri Mar 2 15:00:53 CET 2012


Stefan Krah <stefan at bytereef.org> wrote:
> > Careful. There are tons of code out there that use the buffer interface,
> > and the "obj" field has been the way to handle the buffer release ever
> > since the interface actually worked (somewhere around the release of Py3.0,
> > IIRC).
> > 
> > Personally, I never read the documentation above (which was written way
> > after the design and implementation of the buffer interface).
> 
> The documentation has been largely re-written for 3.3.

But even for 3.0 it's not obvious to me why 'obj' should refer to anything
but the exporter:

http://docs.python.org/release/3.0/c-api/typeobj.html

"obj is the object to export ..."


Stefan Krah




More information about the Python-Dev mailing list