Issue #9294: remove dead code in Objects/object.c. Patch by Grant Limberg.
diff --git a/Misc/ACKS b/Misc/ACKS
index adbf9c1..57065ac 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -479,6 +479,7 @@
Ross Light
Shawn Ligocki
Martin Ligr
+Grant Limberg
Christopher Lindblad
Bjorn Lindqvist
Per Lindqvist
diff --git a/Objects/object.c b/Objects/object.c
index 76d018f..ef23ac1 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -258,15 +258,10 @@
return PyObject_INIT_VAR(op, tp, nitems);
}
-/* Implementation of PyObject_Print with recursion checking */
-static int
-internal_print(PyObject *op, FILE *fp, int flags, int nesting)
+int
+PyObject_Print(PyObject *op, FILE *fp, int flags)
{
int ret = 0;
- if (nesting > 10) {
- PyErr_SetString(PyExc_RuntimeError, "print recursion");
- return -1;
- }
if (PyErr_CheckSignals())
return -1;
#ifdef USE_STACKCHECK
@@ -333,12 +328,6 @@
return ret;
}
-int
-PyObject_Print(PyObject *op, FILE *fp, int flags)
-{
- return internal_print(op, fp, flags, 0);
-}
-
/* For debugging convenience. Set a breakpoint here and call it from your DLL */
void
_Py_BreakPoint(void)