Mercurial > cpython-lru_cache-weakref
diff Objects/object.c @ 63246:e918afd35086
Issue #9294: remove dead code in Objects/object.c. Patch by Grant Limberg.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Tue, 27 Jul 2010 22:08:27 +0000 |
| parents | 0bc8ffe6ba9a |
| children | 0265d5f7bd07 |
line wrap: on
line diff
--- a/Objects/object.c Tue Jul 27 22:03:33 2010 +0000 +++ b/Objects/object.c Tue Jul 27 22:08:27 2010 +0000 @@ -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)
