File tree Expand file tree Collapse file tree 4 files changed +17
-11
lines changed Expand file tree Collapse file tree 4 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -1171,8 +1171,9 @@ This function is meant for internal and specialized purposes only.\n\
1171
1171
In most applications `threading.enumerate()` should be used instead." );
1172
1172
1173
1173
static void
1174
- release_sentinel (void * wr )
1174
+ release_sentinel (void * wr_raw )
1175
1175
{
1176
+ PyObject * wr = _PyObject_CAST (wr_raw );
1176
1177
/* Tricky: this function is called when the current thread state
1177
1178
is being deleted. Therefore, only simple C code can safely
1178
1179
execute here. */
Original file line number Diff line number Diff line change @@ -1847,20 +1847,21 @@ _PyGC_Dump(PyGC_Head *g)
1847
1847
functions must always be available */
1848
1848
1849
1849
void
1850
- PyObject_GC_Track (void * op )
1850
+ PyObject_GC_Track (void * op_raw )
1851
1851
{
1852
- PyObject * obj = ( PyObject * ) op ;
1852
+ PyObject * op = _PyObject_CAST ( op_raw ) ;
1853
1853
if (_PyObject_GC_IS_TRACKED (op )) {
1854
1854
_PyObject_ASSERT_FAILED_MSG (op ,
1855
1855
"object already tracked "
1856
1856
"by the garbage collector" );
1857
1857
}
1858
- _PyObject_GC_TRACK (obj );
1858
+ _PyObject_GC_TRACK (op );
1859
1859
}
1860
1860
1861
1861
void
1862
- PyObject_GC_UnTrack (void * op )
1862
+ PyObject_GC_UnTrack (void * op_raw )
1863
1863
{
1864
+ PyObject * op = _PyObject_CAST (op_raw );
1864
1865
/* Obscure: the Py_TRASHCAN mechanism requires that we be able to
1865
1866
* call PyObject_GC_UnTrack twice on an object.
1866
1867
*/
Original file line number Diff line number Diff line change @@ -1171,14 +1171,17 @@ unicode_kind_name(PyObject *unicode)
1171
1171
1172
1172
#ifdef Py_DEBUG
1173
1173
/* Functions wrapping macros for use in debugger */
1174
- char * _PyUnicode_utf8 (void * unicode ){
1174
+ char * _PyUnicode_utf8 (void * unicode_raw ){
1175
+ PyObject * unicode = _PyObject_CAST (unicode_raw );
1175
1176
return PyUnicode_UTF8 (unicode );
1176
1177
}
1177
1178
1178
- void * _PyUnicode_compact_data (void * unicode ) {
1179
+ void * _PyUnicode_compact_data (void * unicode_raw ) {
1180
+ PyObject * unicode = _PyObject_CAST (unicode_raw );
1179
1181
return _PyUnicode_COMPACT_DATA (unicode );
1180
1182
}
1181
- void * _PyUnicode_data (void * unicode ){
1183
+ void * _PyUnicode_data (void * unicode_raw ) {
1184
+ PyObject * unicode = _PyObject_CAST (unicode_raw );
1182
1185
printf ("obj %p\n" , unicode );
1183
1186
printf ("compact %d\n" , PyUnicode_IS_COMPACT (unicode ));
1184
1187
printf ("compact ascii %d\n" , PyUnicode_IS_COMPACT_ASCII (unicode ));
Original file line number Diff line number Diff line change @@ -373,10 +373,11 @@ hamt_node_collision_count(PyHamtNode_Collision *node);
373
373
374
374
#ifdef Py_DEBUG
375
375
static void
376
- _hamt_node_array_validate (void * o )
376
+ _hamt_node_array_validate (void * obj_raw )
377
377
{
378
- assert (IS_ARRAY_NODE (o ));
379
- PyHamtNode_Array * node = (PyHamtNode_Array * )(o );
378
+ PyObject * obj = _PyObject_CAST (obj_raw );
379
+ assert (IS_ARRAY_NODE (obj ));
380
+ PyHamtNode_Array * node = (PyHamtNode_Array * )obj ;
380
381
Py_ssize_t i = 0 , count = 0 ;
381
382
for (; i < HAMT_ARRAY_NODE_SIZE ; i ++ ) {
382
383
if (node -> a_array [i ] != NULL ) {
You can’t perform that action at this time.
0 commit comments