Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cf0bcd1

Browse files
committed
Merged revisions 83184 via svnmerge from
svn+ssh://[email protected]/python/branches/py3k ........ r83184 | antoine.pitrou | 2010-07-28 00:08:27 +0200 (mer., 28 juil. 2010) | 3 lines Issue #9294: remove dead code in Objects/object.c. Patch by Grant Limberg. ........
1 parent ec34d94 commit cf0bcd1

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ Robert van Liere
454454
Ross Light
455455
Shawn Ligocki
456456
Martin Ligr
457+
Grant Limberg
457458
Christopher Lindblad
458459
Bjorn Lindqvist
459460
Per Lindqvist

Objects/object.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,10 @@ _PyObject_NewVar(PyTypeObject *tp, Py_ssize_t nitems)
258258
return PyObject_INIT_VAR(op, tp, nitems);
259259
}
260260

261-
/* Implementation of PyObject_Print with recursion checking */
262-
static int
263-
internal_print(PyObject *op, FILE *fp, int flags, int nesting)
261+
int
262+
PyObject_Print(PyObject *op, FILE *fp, int flags)
264263
{
265264
int ret = 0;
266-
if (nesting > 10) {
267-
PyErr_SetString(PyExc_RuntimeError, "print recursion");
268-
return -1;
269-
}
270265
if (PyErr_CheckSignals())
271266
return -1;
272267
#ifdef USE_STACKCHECK
@@ -333,12 +328,6 @@ internal_print(PyObject *op, FILE *fp, int flags, int nesting)
333328
return ret;
334329
}
335330

336-
int
337-
PyObject_Print(PyObject *op, FILE *fp, int flags)
338-
{
339-
return internal_print(op, fp, flags, 0);
340-
}
341-
342331
/* For debugging convenience. Set a breakpoint here and call it from your DLL */
343332
void
344333
_Py_BreakPoint(void)

0 commit comments

Comments
 (0)