comparison Python/pythonrun.c @ 44099:f324631462a2

Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
author Christian Heimes <christian@cheimes.de>
date Sun, 02 Dec 2007 14:31:20 +0000
parents 0889daf6d0d9
children e08b12c3b913
comparison
equal deleted inserted replaced
44098:0889daf6d0d9 44099:f324631462a2
1107 goto finally; 1107 goto finally;
1108 1108
1109 Py_DECREF(v); 1109 Py_DECREF(v);
1110 if (!(v = PyObject_GetAttrString(err, "lineno"))) 1110 if (!(v = PyObject_GetAttrString(err, "lineno")))
1111 goto finally; 1111 goto finally;
1112 hold = PyInt_AsLong(v); 1112 hold = PyLong_AsLong(v);
1113 Py_DECREF(v); 1113 Py_DECREF(v);
1114 v = NULL; 1114 v = NULL;
1115 if (hold < 0 && PyErr_Occurred()) 1115 if (hold < 0 && PyErr_Occurred())
1116 goto finally; 1116 goto finally;
1117 *lineno = (int)hold; 1117 *lineno = (int)hold;
1121 if (v == Py_None) { 1121 if (v == Py_None) {
1122 *offset = -1; 1122 *offset = -1;
1123 Py_DECREF(v); 1123 Py_DECREF(v);
1124 v = NULL; 1124 v = NULL;
1125 } else { 1125 } else {
1126 hold = PyInt_AsLong(v); 1126 hold = PyLong_AsLong(v);
1127 Py_DECREF(v); 1127 Py_DECREF(v);
1128 v = NULL; 1128 v = NULL;
1129 if (hold < 0 && PyErr_Occurred()) 1129 if (hold < 0 && PyErr_Occurred())
1130 goto finally; 1130 goto finally;
1131 *offset = (int)hold; 1131 *offset = (int)hold;
1211 goto done; 1211 goto done;
1212 } 1212 }
1213 /* If we failed to dig out the 'code' attribute, 1213 /* If we failed to dig out the 'code' attribute,
1214 just let the else clause below print the error. */ 1214 just let the else clause below print the error. */
1215 } 1215 }
1216 if (PyInt_Check(value)) 1216 if (PyLong_Check(value))
1217 exitcode = (int)PyInt_AsLong(value); 1217 exitcode = (int)PyLong_AsLong(value);
1218 else { 1218 else {
1219 PyObject_Print(value, stderr, Py_PRINT_RAW); 1219 PyObject_Print(value, stderr, Py_PRINT_RAW);
1220 PySys_WriteStderr("\n"); 1220 PySys_WriteStderr("\n");
1221 exitcode = 1; 1221 exitcode = 1;
1222 } 1222 }