summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 2ab77c0..6aedc47 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1132,6 +1132,19 @@ not(v)
return w;
}
+/* External interface to call any callable object. The arg may be NULL. */
+
+object *
+call_object(func, arg)
+ object *func;
+ object *arg;
+{
+ if (is_instancemethodobject(func) || is_funcobject(func))
+ return call_function(func, arg);
+ else
+ return call_builtin(func, arg);
+}
+
static object *
call_builtin(func, arg)
object *func;