Skip to content

Commit d57874e

Browse files
committed
Rename PyUnstable_Object_Dump() to PyObject_Dump()
1 parent 4345253 commit d57874e

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

Doc/c-api/object.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Object Protocol
8585
instead of the :func:`repr`.
8686
8787
88-
.. c:function:: void PyUnstable_Object_Dump(PyObject *op)
88+
.. c:function:: void PyObject_Dump(PyObject *op)
8989
9090
Dump an object *op* to ``stderr``. This should only be used for debugging.
9191

Doc/whatsnew/3.15.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ New features
11051105
* Add :c:func:`PyTuple_FromArray` to create a :class:`tuple` from an array.
11061106
(Contributed by Victor Stinner in :gh:`111489`.)
11071107

1108-
* Add :c:func:`PyUnstable_Object_Dump` to dump an object to ``stderr``.
1108+
* Add :c:func:`PyObject_Dump` to dump an object to ``stderr``.
11091109
It should only be used for debugging.
11101110
(Contributed by Victor Stinner in :gh:`141070`.)
11111111

Modules/_testcapi/object.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,12 @@ pyobject_dump(PyObject *self, PyObject *args)
507507

508508
if (release_gil) {
509509
Py_BEGIN_ALLOW_THREADS
510-
PyUnstable_Object_Dump(op);
510+
PyObject_Dump(op);
511511
Py_END_ALLOW_THREADS
512512

513513
}
514514
else {
515-
PyUnstable_Object_Dump(op);
515+
PyObject_Dump(op);
516516
}
517517
Py_RETURN_NONE;
518518
}

Objects/object.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ _PyObject_IsFreed(PyObject *op)
713713

714714
/* For debugging convenience. See Misc/gdbinit for some useful gdb hooks */
715715
void
716-
PyUnstable_Object_Dump(PyObject* op)
716+
PyObject_Dump(PyObject* op)
717717
{
718718
if (_PyObject_IsFreed(op)) {
719719
/* It seems like the object memory has been freed:
@@ -3157,7 +3157,7 @@ _PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg,
31573157

31583158
/* This might succeed or fail, but we're about to abort, so at least
31593159
try to provide any extra info we can: */
3160-
PyUnstable_Object_Dump(obj);
3160+
PyObject_Dump(obj);
31613161

31623162
fprintf(stderr, "\n");
31633163
fflush(stderr);

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ unicode_check_encoding_errors(const char *encoding, const char *errors)
547547
}
548548

549549
/* Disable checks during Python finalization. For example, it allows to
550-
* call PyUnstable_Object_Dump() during finalization for debugging purpose.
550+
* call PyObject_Dump() during finalization for debugging purpose.
551551
*/
552552
if (_PyInterpreterState_GetFinalizing(interp) != NULL) {
553553
return 0;

Python/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,7 @@ _PyGC_Fini(PyInterpreterState *interp)
22432243
void
22442244
_PyGC_Dump(PyGC_Head *g)
22452245
{
2246-
PyUnstable_Object_Dump(FROM_GC(g));
2246+
PyObject_Dump(FROM_GC(g));
22472247
}
22482248

22492249

Python/pythonrun.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ _PyErr_Display(PyObject *file, PyObject *unused, PyObject *value, PyObject *tb)
11751175
}
11761176
if (print_exception_recursive(&ctx, value) < 0) {
11771177
PyErr_Clear();
1178-
PyUnstable_Object_Dump(value);
1178+
PyObject_Dump(value);
11791179
fprintf(stderr, "lost sys.stderr\n");
11801180
}
11811181
Py_XDECREF(ctx.seen);
@@ -1193,14 +1193,14 @@ PyErr_Display(PyObject *unused, PyObject *value, PyObject *tb)
11931193
PyObject *file;
11941194
if (PySys_GetOptionalAttr(&_Py_ID(stderr), &file) < 0) {
11951195
PyObject *exc = PyErr_GetRaisedException();
1196-
PyUnstable_Object_Dump(value);
1196+
PyObject_Dump(value);
11971197
fprintf(stderr, "lost sys.stderr\n");
1198-
PyUnstable_Object_Dump(exc);
1198+
PyObject_Dump(exc);
11991199
Py_DECREF(exc);
12001200
return;
12011201
}
12021202
if (file == NULL) {
1203-
PyUnstable_Object_Dump(value);
1203+
PyObject_Dump(value);
12041204
fprintf(stderr, "lost sys.stderr\n");
12051205
return;
12061206
}

0 commit comments

Comments
 (0)