1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

* __scm.h (SCM_WTA_DISPATCH_n, SCM_GASSERTn): New macros.

This commit is contained in:
Mikael Djurfeldt 1999-09-07 09:40:35 +00:00
parent 6065fed8ed
commit 89c358b13f

View file

@ -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