summaryrefslogtreecommitdiff
path: root/Objects/bytearrayobject.c
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-09-06 10:03:31 +0000
committerMark Dickinson <dickinsm@gmail.com>2009-09-06 10:03:31 +0000
commitc8a7c7c3b9c28dd2c0f9b81d807f8c7f60cb0924 (patch)
tree151b9d039dc09c20d9b2b36b77d515c8a4970553 /Objects/bytearrayobject.c
parent2596758cb42cb592f2e3c33ef77bc9b02c995510 (diff)
downloadcpython-git-c8a7c7c3b9c28dd2c0f9b81d807f8c7f60cb0924.tar.gz
Issue #6846: bytearray.pop was returning ints in the range [-128, 128)
instead of [0, 256). Thanks Hagen Fürstenau for the report and fix.
Diffstat (limited to 'Objects/bytearrayobject.c')
-rw-r--r--Objects/bytearrayobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 27b41bbf49..4105fa2cfa 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -2773,7 +2773,7 @@ bytearray_pop(PyByteArrayObject *self, PyObject *args)
if (PyByteArray_Resize((PyObject *)self, n - 1) < 0)
return NULL;
- return PyInt_FromLong(value);
+ return PyInt_FromLong((unsigned char)value);
}
PyDoc_STRVAR(remove__doc__,