Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74ca557 commit c55485bCopy full SHA for c55485b
1 file changed
Modules/_bsddb.c
@@ -312,10 +312,9 @@ static Py_buffer * _malloc_view(PyObject *obj)
312
"Py_buffer malloc failed");
313
return NULL;
314
}
315
- /* XXX(gps): PyBUF_LOCKDATA is desired to prevent other theads from
316
- trashing the data buffer while we release the GIL during the db
317
- operation. see http://bugs.python.org/issue1035 */
318
- if (PyObject_GetBuffer(obj, view, PyBUF_SIMPLE) == -1) {
+ /* 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) {
319
PyMem_Free(view);
320
321
0 commit comments