diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 14:37:16 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 14:37:16 +0000 |
commit | ea615bf5d1d108608a0e287b49cf062887e09a03 (patch) | |
tree | 63690c5876f149addb2f90474f80a8ed02c41730 /Python/traceback.c | |
parent | e035b907ea2beef5cebb34c8cdee3af0229ead7b (diff) | |
download | cpython-ea615bf5d1d108608a0e287b49cf062887e09a03.tar.gz |
Use Py_ssize_t to count the
Diffstat (limited to 'Python/traceback.c')
-rw-r--r-- | Python/traceback.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c index b58e8adceb..7b83d8b02d 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -153,7 +153,8 @@ tb_displayline(PyObject *f, char *filename, int lineno, char *name) 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++) { |