mirror of
https://github.com/python/cpython
synced 2026-09-29 09:05:29 +03:00
Use Py_ssize_t to count the
This commit is contained in:
parent
f5adf1eb72
commit
d96ee90993
7 changed files with 24 additions and 22 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue