summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-11-07 07:03:15 -0800
committerKaz Kylheku <kaz@kylheku.com>2018-11-07 07:03:15 -0800
commit19dc84bcf137ed742e824e2b86e403b9f53031fb (patch)
treefb69c06ce6f60f85e49ed6de2f316873d39af47c
parent472b34daf3787e0a05891a1f1cdfc89316b8fc8b (diff)
downloadtxr-19dc84bcf137ed742e824e2b86e403b9f53031fb.tar.gz
txr-19dc84bcf137ed742e824e2b86e403b9f53031fb.tar.bz2
txr-19dc84bcf137ed742e824e2b86e403b9f53031fb.zip
lib: remove unused type checking functions.
* lib.c (type_check2, type_check3): Functions removed. * lib.h (type_check2, type_check3): Declarations removed.
-rw-r--r--lib.c17
-rw-r--r--lib.h2
2 files changed, 0 insertions, 19 deletions
diff --git a/lib.c b/lib.c
index e008eca2..5fc27cf8 100644
--- a/lib.c
+++ b/lib.c
@@ -329,23 +329,6 @@ val throw_mismatch(val self, val obj, type_t t)
type_mismatch(lit("~a: ~s is not of type ~s"), self, obj, code2type(t), nao);
}
-val type_check2(val obj, int t1, int t2)
-{
- if (!is_ptr(obj) || (obj->t.type != t1 && obj->t.type != t2))
- type_mismatch(lit("~s is not of type ~s or ~s"), obj,
- code2type(t1), code2type(t2), nao);
- return t;
-}
-
-val type_check3(val obj, int t1, int t2, int t3)
-{
- if (!is_ptr(obj) || (obj->t.type != t1 && obj->t.type != t2
- && obj->t.type != t3))
- type_mismatch(lit("~s is not of type ~s, ~s nor ~s"), obj,
- code2type(t1), code2type(t2), code2type(t3), nao);
- return t;
-}
-
val class_check(val cobj, val class_sym)
{
type_assert (is_ptr(cobj) && cobj->t.type == COBJ &&
diff --git a/lib.h b/lib.h
index 11228ced..224c88f8 100644
--- a/lib.h
+++ b/lib.h
@@ -515,8 +515,6 @@ INLINE val type_check(val self, val obj, type_t typecode)
throw_mismatch(self, obj, typecode);
return t;
}
-val type_check2(val obj, int, int);
-val type_check3(val obj, int, int, int);
val class_check(val cobj, val class_sym);
val car(val cons);
val cdr(val cons);