diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_bsddb.c | 6 | ||||
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 5 | ||||
-rw-r--r-- | Modules/arraymodule.c | 5 |
3 files changed, 0 insertions, 16 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index 04c3835..3a67a1e 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -312,12 +312,6 @@ static Py_buffer * _malloc_view(PyObject *obj) "Py_buffer malloc failed"); return NULL; } - /* We use PyBUF_LOCK to prevent other threads from trashing the data - buffer while we release the GIL. http://bugs.python.org/issue1035 */ - if (PyObject_GetBuffer(obj, view, PyBUF_LOCK) == -1) { - PyMem_Free(view); - return NULL; - } if (view->ndim > 1) { PyErr_SetString(PyExc_BufferError, "buffers must be single dimension"); diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index fe598d7..c840757 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -2449,11 +2449,6 @@ static int CData_GetBuffer(PyObject *_self, Py_buffer *view, int flags) Py_ssize_t i; if (view == NULL) return 0; - if (((flags & PyBUF_LOCK) == PyBUF_LOCK)) { - PyErr_SetString(PyExc_BufferError, - "Cannot lock this object."); - return -1; - } view->buf = self->b_ptr; view->len = self->b_size; diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index a84126d..ea59a42 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -1779,11 +1779,6 @@ static const void *emptybuf = ""; static int array_buffer_getbuf(arrayobject *self, Py_buffer *view, int flags) { - if ((flags & PyBUF_LOCK)) { - PyErr_SetString(PyExc_BufferError, - "Cannot lock data"); - return -1; - } if (view==NULL) goto finish; view->buf = (void *)self->ob_item; |