summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 935ce52..44239e6 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -58,7 +58,6 @@ static int prtrace PROTO((object *, char *));
static void call_exc_trace PROTO((object **, object**, frameobject *));
static int call_trace
PROTO((object **, object **, frameobject *, char *, object *));
-static int testbool PROTO((object *));
static object *add PROTO((object *, object *));
static object *sub PROTO((object *, object *));
static object *mul PROTO((object *, object *));
@@ -1612,29 +1611,6 @@ flushline()
}
-/* Test a value used as condition, e.g., in a for or if statement.
- Return -1 if an error occurred */
-
-static int
-testbool(v)
- object *v;
-{
- int res;
- if (v == None)
- res = 0;
- else if (v->ob_type->tp_as_number != NULL)
- res = (*v->ob_type->tp_as_number->nb_nonzero)(v);
- else if (v->ob_type->tp_as_mapping != NULL)
- res = (*v->ob_type->tp_as_mapping->mp_length)(v);
- else if (v->ob_type->tp_as_sequence != NULL)
- res = (*v->ob_type->tp_as_sequence->sq_length)(v);
- else
- res = 1;
- if (res > 0)
- res = 1;
- return res;
-}
-
static object *
or(v, w)
object *v, *w;