diff options
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/object.c b/Objects/object.c index 589bf36..732f9cc 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -385,7 +385,7 @@ PyObject_Print(PyObject *op, FILE *fp, int flags) universally available */ Py_BEGIN_ALLOW_THREADS fprintf(fp, "<refcnt %ld at %p>", - (long)op->ob_refcnt, op); + (long)op->ob_refcnt, (void *)op); Py_END_ALLOW_THREADS } else { @@ -499,7 +499,7 @@ _PyObject_Dump(PyObject* op) "address : %p\n", Py_TYPE(op)==NULL ? "NULL" : Py_TYPE(op)->tp_name, (long)op->ob_refcnt, - op); + (void *)op); fflush(stderr); } @@ -1894,7 +1894,7 @@ _Py_PrintReferences(FILE *fp) PyObject *op; fprintf(fp, "Remaining objects:\n"); for (op = refchain._ob_next; op != &refchain; op = op->_ob_next) { - fprintf(fp, "%p [%" PY_FORMAT_SIZE_T "d] ", op, op->ob_refcnt); + fprintf(fp, "%p [%" PY_FORMAT_SIZE_T "d] ", (void *)op, op->ob_refcnt); if (PyObject_Print(op, fp, 0) != 0) PyErr_Clear(); putc('\n', fp); @@ -1910,7 +1910,7 @@ _Py_PrintReferenceAddresses(FILE *fp) PyObject *op; fprintf(fp, "Remaining object addresses:\n"); for (op = refchain._ob_next; op != &refchain; op = op->_ob_next) - fprintf(fp, "%p [%" PY_FORMAT_SIZE_T "d] %s\n", op, + fprintf(fp, "%p [%" PY_FORMAT_SIZE_T "d] %s\n", (void *)op, op->ob_refcnt, Py_TYPE(op)->tp_name); } @@ -2167,7 +2167,7 @@ _PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg, fprintf(stderr, "<object: ob_type=NULL>\n"); } else if (_PyObject_IsFreed((PyObject *)Py_TYPE(obj))) { - fprintf(stderr, "<object: freed type %p>\n", Py_TYPE(obj)); + fprintf(stderr, "<object: freed type %p>\n", (void *)Py_TYPE(obj)); } else { /* Diplay the traceback where the object has been allocated. |