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:
parent
6065fed8ed
commit
89c358b13f
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue