summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/abstract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 655a52a..c0298a8 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -673,7 +673,7 @@ PyBuffer_FillInfo(Py_buffer *view, void *buf, Py_ssize_t len,
{
if (view == NULL) return 0;
if (((flags & PyBUF_LOCK) == PyBUF_LOCK) &&
- readonly >= 0) {
+ readonly != 0) {
PyErr_SetString(PyExc_BufferError,
"Cannot lock this object.");
return -1;