File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ typedef struct tracemalloc_traceback traceback_t;
51
51
/* The maximum number of frames is either:
52
52
- The maximum number of frames we can store in `traceback_t.nframe`
53
53
- The maximum memory size_t we can allocate */
54
- static const unsigned long MAX_NFRAME = Py_MIN (UINT16_MAX , ((SIZE_MAX - sizeof (traceback_t )) / sizeof (frame_t ) + 1 ));
54
+ static const size_t MAX_NFRAME = Py_MIN (UINT16_MAX , ((SIZE_MAX - sizeof (traceback_t )) / sizeof (frame_t ) + 1 ));
55
55
56
56
57
57
#define tracemalloc_empty_traceback _PyRuntime.tracemalloc.empty_traceback
@@ -783,9 +783,9 @@ tracemalloc_deinit(void)
783
783
int
784
784
_PyTraceMalloc_Start (int max_nframe )
785
785
{
786
- if (max_nframe < 1 || (unsigned long ) max_nframe > MAX_NFRAME ) {
786
+ if (max_nframe < 1 || (size_t ) max_nframe > MAX_NFRAME ) {
787
787
PyErr_Format (PyExc_ValueError ,
788
- "the number of frames must be in range [1; %lu ]" ,
788
+ "the number of frames must be in range [1; %zu ]" ,
789
789
MAX_NFRAME );
790
790
return -1 ;
791
791
}
You can’t perform that action at this time.
0 commit comments