@@ -67,7 +67,7 @@ typedef struct
67
67
__attribute__((packed ))
68
68
#endif
69
69
{
70
- Py_uintptr_t ptr ;
70
+ uintptr_t ptr ;
71
71
_PyTraceMalloc_domain_t domain ;
72
72
} pointer_t ;
73
73
@@ -523,7 +523,7 @@ static int
523
523
tracemalloc_use_domain_cb (_Py_hashtable_t * old_traces ,
524
524
_Py_hashtable_entry_t * entry , void * user_data )
525
525
{
526
- Py_uintptr_t ptr ;
526
+ uintptr_t ptr ;
527
527
pointer_t key ;
528
528
_Py_hashtable_t * new_traces = (_Py_hashtable_t * )user_data ;
529
529
const void * pdata = _Py_HASHTABLE_ENTRY_PDATA (old_traces , entry );
@@ -538,7 +538,7 @@ tracemalloc_use_domain_cb(_Py_hashtable_t *old_traces,
538
538
}
539
539
540
540
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.
542
542
* Return 0 on success, -1 on error. */
543
543
static int
544
544
tracemalloc_use_domain (void )
@@ -572,7 +572,7 @@ tracemalloc_use_domain(void)
572
572
573
573
574
574
static void
575
- tracemalloc_remove_trace (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr )
575
+ tracemalloc_remove_trace (_PyTraceMalloc_domain_t domain , uintptr_t ptr )
576
576
{
577
577
trace_t trace ;
578
578
int removed ;
@@ -595,11 +595,11 @@ tracemalloc_remove_trace(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr)
595
595
}
596
596
597
597
#define REMOVE_TRACE (ptr ) \
598
- tracemalloc_remove_trace(DEFAULT_DOMAIN, (Py_uintptr_t )(ptr))
598
+ tracemalloc_remove_trace(DEFAULT_DOMAIN, (uintptr_t )(ptr))
599
599
600
600
601
601
static int
602
- tracemalloc_add_trace (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr ,
602
+ tracemalloc_add_trace (_PyTraceMalloc_domain_t domain , uintptr_t ptr ,
603
603
size_t size )
604
604
{
605
605
pointer_t key = {ptr , domain };
@@ -617,7 +617,7 @@ tracemalloc_add_trace(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr,
617
617
618
618
if (!tracemalloc_config .use_domain && domain != DEFAULT_DOMAIN ) {
619
619
/* 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. */
621
621
if (tracemalloc_use_domain () < 0 ) {
622
622
return -1 ;
623
623
}
@@ -663,7 +663,7 @@ tracemalloc_add_trace(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr,
663
663
}
664
664
665
665
#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)
667
667
668
668
669
669
static void *
@@ -1023,7 +1023,7 @@ tracemalloc_init(void)
1023
1023
hashtable_compare_pointer_t );
1024
1024
}
1025
1025
else {
1026
- tracemalloc_traces = hashtable_new (sizeof (Py_uintptr_t ),
1026
+ tracemalloc_traces = hashtable_new (sizeof (uintptr_t ),
1027
1027
sizeof (trace_t ),
1028
1028
_Py_hashtable_hash_ptr ,
1029
1029
_Py_hashtable_compare_direct );
@@ -1414,7 +1414,7 @@ py_tracemalloc_get_traces(PyObject *self, PyObject *obj)
1414
1414
1415
1415
1416
1416
static 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 )
1418
1418
{
1419
1419
trace_t trace ;
1420
1420
int found ;
@@ -1461,7 +1461,7 @@ py_tracemalloc_get_object_traceback(PyObject *self, PyObject *obj)
1461
1461
else
1462
1462
ptr = (void * )obj ;
1463
1463
1464
- traceback = tracemalloc_get_traceback (DEFAULT_DOMAIN , (Py_uintptr_t )ptr );
1464
+ traceback = tracemalloc_get_traceback (DEFAULT_DOMAIN , (uintptr_t )ptr );
1465
1465
if (traceback == NULL )
1466
1466
Py_RETURN_NONE ;
1467
1467
@@ -1489,7 +1489,7 @@ _PyMem_DumpTraceback(int fd, const void *ptr)
1489
1489
traceback_t * traceback ;
1490
1490
int i ;
1491
1491
1492
- traceback = tracemalloc_get_traceback (DEFAULT_DOMAIN , (Py_uintptr_t )ptr );
1492
+ traceback = tracemalloc_get_traceback (DEFAULT_DOMAIN , (uintptr_t )ptr );
1493
1493
if (traceback == NULL )
1494
1494
return ;
1495
1495
@@ -1762,7 +1762,7 @@ _PyTraceMalloc_Fini(void)
1762
1762
}
1763
1763
1764
1764
int
1765
- _PyTraceMalloc_Track (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr ,
1765
+ _PyTraceMalloc_Track (_PyTraceMalloc_domain_t domain , uintptr_t ptr ,
1766
1766
size_t size )
1767
1767
{
1768
1768
int res ;
@@ -1791,7 +1791,7 @@ _PyTraceMalloc_Track(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr,
1791
1791
1792
1792
1793
1793
int
1794
- _PyTraceMalloc_Untrack (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr )
1794
+ _PyTraceMalloc_Untrack (_PyTraceMalloc_domain_t domain , uintptr_t ptr )
1795
1795
{
1796
1796
if (!tracemalloc_config .tracing ) {
1797
1797
/* tracemalloc is not tracing: do nothing */
@@ -1807,7 +1807,7 @@ _PyTraceMalloc_Untrack(_PyTraceMalloc_domain_t domain, Py_uintptr_t ptr)
1807
1807
1808
1808
1809
1809
PyObject *
1810
- _PyTraceMalloc_GetTraceback (_PyTraceMalloc_domain_t domain , Py_uintptr_t ptr )
1810
+ _PyTraceMalloc_GetTraceback (_PyTraceMalloc_domain_t domain , uintptr_t ptr )
1811
1811
{
1812
1812
traceback_t * traceback ;
1813
1813
0 commit comments