mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
(scm_make_gsubr): On "too many args" error,
also display arg count and name.
This commit is contained in:
parent
3e8aa51d77
commit
82599ef14c
1 changed files with 7 additions and 5 deletions
|
@ -80,7 +80,9 @@ scm_make_gsubr(const char *name,int req,int opt,int rst,SCM (*fcn)())
|
|||
SCM symcell = scm_sysintern (name, SCM_UNDEFINED);
|
||||
SCM cclo = scm_makcclo (scm_f_gsubr_apply, 3L);
|
||||
if (SCM_GSUBR_MAX < req + opt + rst) {
|
||||
fputs("ERROR in scm_make_gsubr: too many args\n", stderr);
|
||||
fprintf (stderr,
|
||||
"ERROR in scm_c_make_gsubr: too many args (%d) to %s\n",
|
||||
req + opt + rst, name);
|
||||
exit (1);
|
||||
}
|
||||
SCM_GSUBR_PROC (cclo) = scm_make_subr_opt (name, scm_tc7_subr_0, fcn, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue