Mercurial > cpython-lru_cache-weakref
diff Python/traceback.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 | 1c4d192f1568 |
| children | e9a7a2784e17 |
line wrap: on
line diff
--- a/Python/traceback.c Thu Feb 16 14:35:38 2006 +0000 +++ b/Python/traceback.c Thu Feb 16 14:37:16 2006 +0000 @@ -153,7 +153,8 @@ tail++; path = PySys_GetObject("path"); if (path != NULL && PyList_Check(path)) { - int npath = PyList_Size(path); + Py_ssize_t _npath = PyList_Size(path); + int npath = Py_SAFE_DOWNCAST(_npath, Py_ssize_t, int); size_t taillen = strlen(tail); char namebuf[MAXPATHLEN+1]; for (i = 0; i < npath; i++) {
