[issue3139] bytearrays are not thread safe
Antoine Pitrou
report at bugs.python.org
Fri Aug 1 17:46:25 CEST 2008
Antoine Pitrou <pitrou at free.fr> added the comment:
Selon "Martin v. Löwis" <report at bugs.python.org>:
>
> As for making Py_buffer own a reference to the object: what should be
> the semantics for PyObject_ReleaseBuffer? I see the following options:
> - Drop PyObject_ReleaseBuffer
> - make it DECREF the embedded object, whether or not it is the same as
> the object being passed in
> - leave it as-is, and require the caller to DECREF.
I don't know, is there supposed to be a semantic difference between
PyObject_ReleaseBuffer and PyBuffer_Release? If not, I'd say drop it.
Also, I think it's fine if you commit your fix without adding an incref/decref.
In the absence of the designer of the buffer API it is difficult to know what
subtleties should be taken into account when trying to change that API...
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3139>
_______________________________________
More information about the Python-bugs-list
mailing list