Skip to content

Commit 1831629

Browse files
committed
fix: ci and windows compile
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
1 parent 6863f25 commit 1831629

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

Python/pythonrun.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,6 @@ _PyErr_Display(PyObject *file, PyObject *unused, PyObject *value, PyObject *tb)
11621162
Py_XDECREF(print_exception_fn);
11631163
}
11641164
}
1165-
fallback:
11661165
#ifdef Py_DEBUG
11671166
if (PyErr_Occurred()) {
11681167
PyErr_FormatUnraisable(

Python/traceback.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include "osdefs.h" // SEP
1717
#include <stdio.h> // fopen, fclose
18-
#include <limits.h> // PATH_MAX
1918
#include <string.h> // strlen
2019
#ifdef HAVE_UNISTD_H
2120
# include <unistd.h> // lseek()
@@ -90,7 +89,7 @@ _PyTraceback_IsSafeToImport(void)
9089
return 1;
9190
}
9291
// Check if traceback.py exists in the first path directory
93-
char traceback_path[PATH_MAX];
92+
char traceback_path[MAXPATHLEN];
9493
int ret = snprintf(traceback_path, sizeof(traceback_path), "%s/traceback.py", path_str);
9594
if (ret <= 0 || ret >= (int)sizeof(traceback_path)) {
9695
return 1; // Path too long or other error, default to safe

0 commit comments

Comments
 (0)