[Python-Dev] pre-PEP: The Safe Buffer Interface

Guido van Rossum guido@python.org
Tue, 30 Jul 2002 14:59:06 -0400


> From: "Guido van Rossum" <guido@python.org>
> > > > ..., but I understand Neil's requirements.
> > > > 
> > > > Can they be fulfilled by adding some kind of UnlockObject()
> > > > call to the 'safe buffer interface', which should mean 'I won't
> > > > use the pointer received by getsaferead/writebufferproc any more'?
> > > 
> > >    Yes, that is exactly what I want.
> > 
> > I guess I still don't understand Neil's requirements.  What can't be
> > done with the existing buffer interface (which requires you to hold
> > the GIL while using the pointer)?
> 
> Processing in Python :-(.

Can you work out an example?  I don't understand what you can do in
Python, apart from passing it to something else that takes the buffer
API or converting the data to a string or a bytes buffer.

--Guido van Rossum (home page: http://www.python.org/~guido/)