diff Objects/longobject.c @ 52739:7fa0f81d607e legacy-trunk

sys.long_info attributes should be ints, not longs
author Mark Dickinson <dickinsm@gmail.com>
date Thu, 02 Apr 2009 18:39:37 +0000
parents a54ef18ab0d8
children 8f28ce7b8e69
line wrap: on
line diff
--- a/Objects/longobject.c	Thu Apr 02 18:09:04 2009 +0000
+++ b/Objects/longobject.c	Thu Apr 02 18:39:37 2009 +0000
@@ -3736,8 +3736,10 @@
 	long_info = PyStructSequence_New(&Long_InfoType);
 	if (long_info == NULL)
 		return NULL;
-	PyStructSequence_SET_ITEM(long_info, field++, PyLong_FromLong(PyLong_SHIFT));
-	PyStructSequence_SET_ITEM(long_info, field++, PyLong_FromLong(sizeof(digit)));
+	PyStructSequence_SET_ITEM(long_info, field++,
+				  PyInt_FromLong(PyLong_SHIFT));
+	PyStructSequence_SET_ITEM(long_info, field++,
+				  PyInt_FromLong(sizeof(digit)));
 	if (PyErr_Occurred()) {
 		Py_CLEAR(long_info);
 		return NULL;