summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-26 00:39:50 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-26 00:39:50 (GMT)
commita6f605022914ff7817ea7003825df32985dcacc3 (patch)
treedcd34ff5768aed8cea599b6a9ba310a1892fdd10 /Python
parente95d92b65e0d524448e3b481d400867c4cb4aa05 (diff)
downloadcpython-a6f605022914ff7817ea7003825df32985dcacc3.zip
cpython-a6f605022914ff7817ea7003825df32985dcacc3.tar.gz
cpython-a6f605022914ff7817ea7003825df32985dcacc3.tar.bz2
moved callable() to object.c
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 517aea1..551d009 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -87,32 +87,6 @@ builtin_apply(self, args)
return call_object(func, arglist);
}
-static int
-callable(x)
- object *x;
-{
- if (x == NULL)
- return 0;
- if (x->ob_type->tp_call != NULL ||
- is_funcobject(x) ||
- is_instancemethodobject(x) ||
- is_methodobject(x) ||
- is_classobject(x))
- return 1;
- if (is_instanceobject(x)) {
- object *call = getattr(x, "__call__");
- if (call == NULL) {
- err_clear();
- return 0;
- }
- /* Could test recursively but don't, for fear of endless
- recursion if some joker sets self.__call__ = self */
- DECREF(call);
- return 1;
- }
- return 0;
-}
-
static object *
builtin_callable(self, args)
object *self;
@@ -420,8 +394,6 @@ builtin_execfile(self, args)
object *globals = None, *locals = None;
object *res;
FILE* fp;
- char *s;
- int n;
if (!newgetargs(args, "s|O!O!:execfile",
&filename,
@@ -1050,7 +1022,6 @@ builtin_xrange(self, args)
{
long ilow = 0, ihigh = 0, istep = 1;
long n;
- object *v;
if (gettuplesize(args) <= 1) {
if (!newgetargs(args,