summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-07-27 22:08:27 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-07-27 22:08:27 (GMT)
commitc47bd4a09a6702a08e5fb15d1d8ab3478393aba9 (patch)
tree85fcbf5919c8433850b145bad8bc35eb5085b835 /Objects
parent63c46403279fcb6a9cae43c475fd2c58e1303b0b (diff)
downloadcpython-c47bd4a09a6702a08e5fb15d1d8ab3478393aba9.zip
cpython-c47bd4a09a6702a08e5fb15d1d8ab3478393aba9.tar.gz
cpython-c47bd4a09a6702a08e5fb15d1d8ab3478393aba9.tar.bz2
Issue #9294: remove dead code in Objects/object.c. Patch by Grant Limberg.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/object.c15
1 files changed, 2 insertions, 13 deletions
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 @@ _PyObject_NewVar(PyTypeObject *tp, Py_ssize_t nitems)
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 @@ internal_print(PyObject *op, FILE *fp, int flags, int nesting)
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)