[Python-Dev] pre-PEP: The Safe Buffer Interface
Thomas Heller
thomas.heller@ion-tof.com
Mon, 29 Jul 2002 16:34:46 +0200
[Scott]
> > The "safe
> > buffer protocol" is likely to cater to a wide class of users. I could be
> > wrong, but the "lockable gapped buffer protocol" probably appeals to a
> much
> > smaller set.
>
[Neil]
> Its not that a "lockable gapped buffer protocol" is needed. It is that
> the problem with the old buffer was that the lifetime of the pointer is not
> well defined. The proposal changes that by making the lifetime of the
> pointer be the same as the underlying object.
That's exactly what *I* need, ...
> This restricts the set of
> objects that can be buffers to statically sized objects. I'd prefer that
> dynamically resizable objects be able to be buffers.
>
..., 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'?
Thomas