mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Merged revisions 65654 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r65654 | martin.v.loewis | 2008-08-12 16:49:50 +0200 (Tue, 12 Aug 2008) | 6 lines Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple, by denying s# to parse objects that have a releasebuffer procedure, and introducing s*. More module might need to get converted to use s*. ........
This commit is contained in:
parent
688356f59f
commit
423be95dcf
32 changed files with 721 additions and 390 deletions
|
@ -1820,6 +1820,8 @@ array_buffer_getbuf(arrayobject *self, Py_buffer *view, int flags)
|
|||
if (view==NULL) goto finish;
|
||||
|
||||
view->buf = (void *)self->ob_item;
|
||||
view->obj = (PyObject*)self;
|
||||
Py_INCREF(self);
|
||||
if (view->buf == NULL)
|
||||
view->buf = (void *)emptybuf;
|
||||
view->len = (Py_SIZE(self)) * self->ob_descr->itemsize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue