commit | c8a7c7c3b9c28dd2c0f9b81d807f8c7f60cb0924 | [log] [tgz] |
---|---|---|
author | Mark Dickinson <dickinsm@gmail.com> | Sun Sep 06 10:03:31 2009 +0000 |
committer | Mark Dickinson <dickinsm@gmail.com> | Sun Sep 06 10:03:31 2009 +0000 |
tree | 151b9d039dc09c20d9b2b36b77d515c8a4970553 | |
parent | 2596758cb42cb592f2e3c33ef77bc9b02c995510 [diff] [blame] |
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.
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 27b41bb..4105fa2 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c
@@ -2773,7 +2773,7 @@ if (PyByteArray_Resize((PyObject *)self, n - 1) < 0) return NULL; - return PyInt_FromLong(value); + return PyInt_FromLong((unsigned char)value); } PyDoc_STRVAR(remove__doc__,