@@ -67,7 +67,7 @@ typedef struct
6767__attribute__((packed ))
6868#endif
6969{
70- Py_uintptr_t ptr ;
70+ uintptr_t ptr ;
7171 _PyTraceMalloc_domain_t domain ;
7272} pointer_t ;
7373
@@ -523,7 +523,7 @@ static int
523523tracemalloc_use_domain_cb (_Py_hashtable_t * old_traces ,
524524 _Py_hashtable_entry_t * entry , void * user_data )
525525{
526- Py_uintptr_t ptr ;
526+ uintptr_t ptr ;
527527 pointer_t key ;
528528 _Py_hashtable_t * new_traces = (_Py_hashtable_t * )user_data ;
529529 const void * pdata = _Py_HASHTABLE_ENTRY_PDATA (old_traces , entry );
@@ -538,7 +538,7 @@ tracemalloc_use_domain_cb(_Py_hashtable_t *old_traces,
538538}
539539
540540
541- /* Convert tracemalloc_traces from compact key (Py_uintptr_t ) to pointer_t key.
541+ /* Convert tracemalloc_traces from compact key (uintptr_t ) to pointer_t key.
542542 * Return 0 on success, -1 on error. */
543543static int
544544tracemalloc_use_domain (void )
@@ -572,7 +572,7 @@ tracemalloc_use_domain(void)
572572
573573
574574static void
575- tracemalloc_remove_trace (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr )
575+ tracemalloc_remove_trace (_PyTraceMalloc_domain_t domain , uintptr_t ptr )
576576{
577577 trace_t trace ;
578578 int removed ;
@@ -595,11 +595,11 @@ tracemalloc_remove_trace(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr)
595595}
596596
597597#define REMOVE_TRACE (ptr ) \
598- tracemalloc_remove_trace(DEFAULT_DOMAIN, (Py_uintptr_t )(ptr))
598+ tracemalloc_remove_trace(DEFAULT_DOMAIN, (uintptr_t )(ptr))
599599
600600
601601static int
602- tracemalloc_add_trace (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr ,
602+ tracemalloc_add_trace (_PyTraceMalloc_domain_t domain , uintptr_t ptr ,
603603 size_t size )
604604{
605605 pointer_t key = {ptr , domain };
@@ -617,7 +617,7 @@ tracemalloc_add_trace(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr,
617617
618618 if (!tracemalloc_config .use_domain && domain != DEFAULT_DOMAIN ) {
619619 /* first trace using a non-zero domain whereas traces use compact
620- (Py_uintptr_t ) keys: switch to pointer_t keys. */
620+ (uintptr_t ) keys: switch to pointer_t keys. */
621621 if (tracemalloc_use_domain () < 0 ) {
622622 return -1 ;
623623 }
@@ -663,7 +663,7 @@ tracemalloc_add_trace(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr,
663663}
664664
665665#define ADD_TRACE (ptr , size ) \
666- tracemalloc_add_trace(DEFAULT_DOMAIN, (Py_uintptr_t )(ptr), size)
666+ tracemalloc_add_trace(DEFAULT_DOMAIN, (uintptr_t )(ptr), size)
667667
668668
669669static void *
@@ -1023,7 +1023,7 @@ tracemalloc_init(void)
10231023 hashtable_compare_pointer_t );
10241024 }
10251025 else {
1026- tracemalloc_traces = hashtable_new (sizeof (Py_uintptr_t ),
1026+ tracemalloc_traces = hashtable_new (sizeof (uintptr_t ),
10271027 sizeof (trace_t ),
10281028 _Py_hashtable_hash_ptr ,
10291029 _Py_hashtable_compare_direct );
@@ -1414,7 +1414,7 @@ py_tracemalloc_get_traces(PyObject *self, PyObject *obj)
14141414
14151415
14161416static traceback_t *
1417- tracemalloc_get_traceback (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr )
1417+ tracemalloc_get_traceback (_PyTraceMalloc_domain_t domain , uintptr_t ptr )
14181418{
14191419 trace_t trace ;
14201420 int found ;
@@ -1461,7 +1461,7 @@ py_tracemalloc_get_object_traceback(PyObject *self, PyObject *obj)
14611461 else
14621462 ptr = (void * )obj ;
14631463
1464- traceback = tracemalloc_get_traceback (DEFAULT_DOMAIN , (Py_uintptr_t )ptr );
1464+ traceback = tracemalloc_get_traceback (DEFAULT_DOMAIN , (uintptr_t )ptr );
14651465 if (traceback == NULL )
14661466 Py_RETURN_NONE ;
14671467
@@ -1489,7 +1489,7 @@ _PyMem_DumpTraceback(int fd, const void *ptr)
14891489 traceback_t * traceback ;
14901490 int i ;
14911491
1492- traceback = tracemalloc_get_traceback (DEFAULT_DOMAIN , (Py_uintptr_t )ptr );
1492+ traceback = tracemalloc_get_traceback (DEFAULT_DOMAIN , (uintptr_t )ptr );
14931493 if (traceback == NULL )
14941494 return ;
14951495
@@ -1762,7 +1762,7 @@ _PyTraceMalloc_Fini(void)
17621762}
17631763
17641764int
1765- _PyTraceMalloc_Track (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr ,
1765+ _PyTraceMalloc_Track (_PyTraceMalloc_domain_t domain , uintptr_t ptr ,
17661766 size_t size )
17671767{
17681768 int res ;
@@ -1791,7 +1791,7 @@ _PyTraceMalloc_Track(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr,
17911791
17921792
17931793int
1794- _PyTraceMalloc_Untrack (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr )
1794+ _PyTraceMalloc_Untrack (_PyTraceMalloc_domain_t domain , uintptr_t ptr )
17951795{
17961796 if (!tracemalloc_config .tracing ) {
17971797 /* tracemalloc is not tracing: do nothing */
@@ -1807,7 +1807,7 @@ _PyTraceMalloc_Untrack(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr)
18071807
18081808
18091809PyObject *
1810- _PyTraceMalloc_GetTraceback (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr )
1810+ _PyTraceMalloc_GetTraceback (_PyTraceMalloc_domain_t domain , uintptr_t ptr )
18111811{
18121812 traceback_t * traceback ;
18131813
0 commit comments