From 19dc84bcf137ed742e824e2b86e403b9f53031fb Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 7 Nov 2018 07:03:15 -0800 Subject: lib: remove unused type checking functions. * lib.c (type_check2, type_check3): Functions removed. * lib.h (type_check2, type_check3): Declarations removed. --- lib.c | 17 ----------------- lib.h | 2 -- 2 files changed, 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); -- cgit v1.2.3