Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ _PyObject_Dump(PyObject* op)
if (_PyObject_IsFreed(op)) {
/* It seems like the object memory has been freed:
don't access it to prevent a segmentation fault. */
fprintf(stderr, "<object at %p is freed>\n", op);
fprintf(stderr, "<object at %p is freed>\n", (const void *)op);
fflush(stderr);
return;
}
Expand All @@ -362,7 +362,7 @@ _PyObject_Dump(PyObject* op)
fflush(stderr);

PyTypeObject *type = Py_TYPE(op);
fprintf(stderr, "object type : %p\n", type);
fprintf(stderr, "object type : %p\n", (const void *)type);
fprintf(stderr, "object type name: %s\n",
type==NULL ? "NULL" : type->tp_name);

Expand Down Expand Up @@ -2168,7 +2168,7 @@ _PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg,
if (_PyObject_IsFreed(obj)) {
/* It seems like the object memory has been freed:
don't access it to prevent a segmentation fault. */
fprintf(stderr, "<object at %p is freed>\n", obj);
fprintf(stderr, "<object at %p is freed>\n", (const void *)obj);
fflush(stderr);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion Python/pylifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ fatal_error_dump_runtime(FILE *stream, _PyRuntimeState *runtime)
fprintf(stream, "Python runtime state: ");
PyThreadState *finalizing = _PyRuntimeState_GetFinalizing(runtime);
if (finalizing) {
fprintf(stream, "finalizing (tstate=%p)", finalizing);
fprintf(stream, "finalizing (tstate=%p)", (const void *)finalizing);
}
else if (runtime->initialized) {
fprintf(stream, "initialized");
Expand Down