[Python-Dev] Deprecate the buffer object?
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Oct 29 21:30:18 EST 2003
Neil Schemenauer:
> Okay. Perhaps I am missing something but would fixing it be as
> simple as adding another field to the tp_as_buffer struct?
>
> /* references returned by the buffer functins are valid while
> * the object remains alive */
> #define PyBuffer_FLAG_SAFE 1
That's completely different from what I had in mind, which was:
(1) Keep a reference to the base object in the buffer object, and
(2) Use the buffer API to fetch a fresh pointer from the
base object each time it's needed.
Is there some reason that still wouldn't be safe enough?
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg at cosc.canterbury.ac.nz +--------------------------------------+
More information about the Python-Dev
mailing list