@@ -385,7 +385,7 @@ PyObject_Print(PyObject *op, FILE *fp, int flags)
385385 universally available */
386386 Py_BEGIN_ALLOW_THREADS
387387 fprintf (fp , "<refcnt %ld at %p>" ,
388- (long )op -> ob_refcnt , op );
388+ (long )op -> ob_refcnt , ( void * ) op );
389389 Py_END_ALLOW_THREADS
390390 }
391391 else {
@@ -499,7 +499,7 @@ _PyObject_Dump(PyObject* op)
499499 "address : %p\n" ,
500500 Py_TYPE (op )== NULL ? "NULL" : Py_TYPE (op )-> tp_name ,
501501 (long )op -> ob_refcnt ,
502- op );
502+ ( void * ) op );
503503 fflush (stderr );
504504}
505505
@@ -1894,7 +1894,7 @@ _Py_PrintReferences(FILE *fp)
18941894 PyObject * op ;
18951895 fprintf (fp , "Remaining objects:\n" );
18961896 for (op = refchain ._ob_next ; op != & refchain ; op = op -> _ob_next ) {
1897- fprintf (fp , "%p [%" PY_FORMAT_SIZE_T "d] " , op , op -> ob_refcnt );
1897+ fprintf (fp , "%p [%" PY_FORMAT_SIZE_T "d] " , ( void * ) op , op -> ob_refcnt );
18981898 if (PyObject_Print (op , fp , 0 ) != 0 )
18991899 PyErr_Clear ();
19001900 putc ('\n' , fp );
@@ -1910,7 +1910,7 @@ _Py_PrintReferenceAddresses(FILE *fp)
19101910 PyObject * op ;
19111911 fprintf (fp , "Remaining object addresses:\n" );
19121912 for (op = refchain ._ob_next ; op != & refchain ; op = op -> _ob_next )
1913- fprintf (fp , "%p [%" PY_FORMAT_SIZE_T "d] %s\n" , op ,
1913+ fprintf (fp , "%p [%" PY_FORMAT_SIZE_T "d] %s\n" , ( void * ) op ,
19141914 op -> ob_refcnt , Py_TYPE (op )-> tp_name );
19151915}
19161916
@@ -2167,7 +2167,7 @@ _PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg,
21672167 fprintf (stderr , "<object: ob_type=NULL>\n" );
21682168 }
21692169 else if (_PyObject_IsFreed ((PyObject * )Py_TYPE (obj ))) {
2170- fprintf (stderr , "<object: freed type %p>\n" , Py_TYPE (obj ));
2170+ fprintf (stderr , "<object: freed type %p>\n" , ( void * ) Py_TYPE (obj ));
21712171 }
21722172 else {
21732173 /* Diplay the traceback where the object has been allocated.
0 commit comments