[Python-checkins] cpython (2.7): array.buffer_info() should return a length as int, not long, for compatibility.

serhiy.storchaka python-checkins at python.org
Fri Jun 24 01:39:25 EDT 2016


https://hg.python.org/cpython/rev/c3a3ac173bb7
changeset: 102144:c3a3ac173bb7
branch: 2.7
user: Serhiy Storchaka <storchaka at gmail.com>
date: Fri Jun 24 08:38:59 2016 +0300
summary:
 array.buffer_info() should return a length as int, not long, for compatibility.
files:
 Modules/arraymodule.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1080,7 +1080,7 @@
 }
 PyTuple_SET_ITEM(retval, 0, v);
 
- v = PyLong_FromSsize_t(Py_SIZE(self));
+ v = PyInt_FromSsize_t(Py_SIZE(self));
 if (v == NULL) {
 Py_DECREF(retval);
 return NULL;
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /