comparison Python/errors.c @ 36521:30aef3ce2b26 legacy-trunk

Use Py_ssize_t to count the
author Martin v. Löwis <martin@v.loewis.de>
date Thu, 16 Feb 2006 14:37:16 +0000
parents ed4dc05ea4b8
children e3248f1fc54d
comparison
equal deleted inserted replaced
36520:26470cdeea3d 36521:30aef3ce2b26
81 if (err == NULL || exc == NULL) { 81 if (err == NULL || exc == NULL) {
82 /* maybe caused by "import exceptions" that failed early on */ 82 /* maybe caused by "import exceptions" that failed early on */
83 return 0; 83 return 0;
84 } 84 }
85 if (PyTuple_Check(exc)) { 85 if (PyTuple_Check(exc)) {
86 int i, n; 86 Py_ssize_t i, n;
87 n = PyTuple_Size(exc); 87 n = PyTuple_Size(exc);
88 for (i = 0; i < n; i++) { 88 for (i = 0; i < n; i++) {
89 /* Test recursively */ 89 /* Test recursively */
90 if (PyErr_GivenExceptionMatches( 90 if (PyErr_GivenExceptionMatches(
91 err, PyTuple_GET_ITEM(exc, i))) 91 err, PyTuple_GET_ITEM(exc, i)))