Skip to content

Commit 7e7c4b2

Browse files
committed
fix clangcl warning in tracemalloc.c
1 parent e82c2ca commit 7e7c4b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Python/tracemalloc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ typedef struct tracemalloc_traceback traceback_t;
5353
/* The maximum number of frames is either:
5454
- The maximum number of frames we can store in `traceback_t.nframe`
5555
- The maximum memory size_t we can allocate */
56-
static const unsigned long MAX_NFRAME = Py_MIN(UINT16_MAX, ((SIZE_MAX - sizeof(traceback_t)) / sizeof(frame_t) + 1));
56+
static const unsigned long MAX_NFRAME = (unsigned long)Py_MIN(
57+
UINT16_MAX, ((SIZE_MAX - sizeof(traceback_t)) / sizeof(frame_t) + 1));
5758

5859

5960
#define tracemalloc_empty_traceback _PyRuntime.tracemalloc.empty_traceback

0 commit comments

Comments
 (0)