From 89c358b13fc125f0d66cec7de0f8f3a682c41d81 Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Tue, 7 Sep 1999 09:40:35 +0000 Subject: [PATCH] * __scm.h (SCM_WTA_DISPATCH_n, SCM_GASSERTn): New macros. --- libguile/__scm.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libguile/__scm.h b/libguile/__scm.h index 888ba18e2..5aa5e10c0 100644 --- a/libguile/__scm.h +++ b/libguile/__scm.h @@ -437,6 +437,17 @@ extern SCM scm_call_generic_2 (SCM gf, SCM a1, SCM a2); #define SCM_GASSERT2(cond, gf, a1, a2, pos, subr) \ if (!(cond)) SCM_WTA_DISPATCH_2((gf), (a1), (a2), (pos), (subr)) +extern SCM scm_apply_generic (SCM gf, SCM args); + +#define SCM_WTA_DISPATCH_n(gf, args, pos, subr) \ + return ((gf) \ + ? scm_apply_generic ((gf), (args)) \ + : scm_wta (scm_list_ref ((args), SCM_MAKINUM ((pos) - 1)), \ + (char *) (pos), \ + (subr))) +#define SCM_GASSERTn(cond, gf, args, pos, subr) \ + if (!(cond)) SCM_WTA_DISPATCH_n((gf), (args), (pos), (subr)) + #define SCM_ARGn 0 #define SCM_ARG1 1 #define SCM_ARG2 2