[Python-Dev] Fw: Behavior of buffer()
Guido van Rossum
guido@python.org
Thu, 18 Jul 2002 14:42:30 -0400
> Yes. The PyBufferObject grabs the pointer from the PyBufferProcs
> supporting object when the PyBufferObject is created. If the PyBufferProcs
> supporting object reallocates the memory (possibly from a resize) the
> PyBufferObject can be left with a bad pointer. This is easily possible if
> you try to use the array module arrays as a buffer.
>
> I've submitted a patch to fix this particular problem (among others), but
> there are still enough things that the buffer object can't do that
> something new is needed.
Can you remind me of the patch#? (I'm curious how you plan to fix
this...)
> In the PEP that I'm drafting, I've been calling the new object "bytes"
> (since it is just a simple array of bytes). Now that you guys are
> referring to it as the "memory object", should I change the name? Doesn't
> really matter, but it might avoid confusion to know we're all talking about
> the same thing.
I like bytes just fine.
PS, Todd, if you can, please don't send HTML-only mail to
python-dev...
--Guido van Rossum (home page: http://www.python.org/~guido/)