summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/object.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 95045ed..49b1cba 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -274,11 +274,8 @@ PyObject_Print(PyObject *op, FILE *fp, int flags)
}
else {
if (Py_REFCNT(op) <= 0) {
- /* XXX(twouters) cast refcount to long until %zd is
- universally available */
Py_BEGIN_ALLOW_THREADS
- fprintf(fp, "<refcnt %ld at %p>",
- (long)Py_REFCNT(op), (void *)op);
+ fprintf(fp, "<refcnt %zd at %p>", Py_REFCNT(op), (void *)op);
Py_END_ALLOW_THREADS
}
else {
@@ -371,9 +368,7 @@ _PyObject_Dump(PyObject* op)
/* first, write fields which are the least likely to crash */
fprintf(stderr, "object address : %p\n", (void *)op);
- /* XXX(twouters) cast refcount to long until %zd is
- universally available */
- fprintf(stderr, "object refcount : %ld\n", (long)Py_REFCNT(op));
+ fprintf(stderr, "object refcount : %zd\n", Py_REFCNT(op));
fflush(stderr);
PyTypeObject *type = Py_TYPE(op);