From d96ee909934f3855135589e0e8d6ece1912c1f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 16 Feb 2006 14:37:16 +0000 Subject: Use Py_ssize_t to count the --- Python/traceback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/traceback.c') 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++) { -- cgit v1.2.1