summaryrefslogtreecommitdiffstats
path: root/Python/traceback.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-02-16 14:37:16 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-02-16 14:37:16 (GMT)
commitd96ee909934f3855135589e0e8d6ece1912c1f22 (patch)
tree831f7231c28aecc2be637bc80994e6ccabd009f2 /Python/traceback.c
parentf5adf1eb72c755c3f6183199656f18b12a1cb952 (diff)
downloadcpython-d96ee909934f3855135589e0e8d6ece1912c1f22.zip
cpython-d96ee909934f3855135589e0e8d6ece1912c1f22.tar.gz
cpython-d96ee909934f3855135589e0e8d6ece1912c1f22.tar.bz2
Use Py_ssize_t to count the
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index b58e8ad..7b83d8b 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++) {