summaryrefslogtreecommitdiff
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2006-06-09 22:38:29 +0000
committerBrett Cannon <bcannon@gmail.com>2006-06-09 22:38:29 +0000
commit7afe7fe14afc3e84f2c1e7b1f666b557860f430c (patch)
treecaa5a1518eff7a01be51ee4a2480e928fa43858d /Objects/abstract.c
parent3337cfdc4ab921c1ac85dea254b6b94f88155476 (diff)
downloadcpython-git-7afe7fe14afc3e84f2c1e7b1f666b557860f430c.tar.gz
Backport of fix of bug #532646 for new-style classes.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 159af3499b..895e915fc5 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1792,7 +1792,10 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
ternaryfunc call;
if ((call = func->ob_type->tp_call) != NULL) {
+ if (Py_EnterRecursiveCall(" in __call__"))
+ return NULL;
PyObject *result = (*call)(func, arg, kw);
+ Py_LeaveRecursiveCall();
if (result == NULL && !PyErr_Occurred())
PyErr_SetString(
PyExc_SystemError,