mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-13 07:10:20 +02:00
(scm_append): Track argument number and use in error.
This commit is contained in:
parent
cc56ba8062
commit
4c13270f34
1 changed files with 3 additions and 1 deletions
|
@ -231,6 +231,7 @@ SCM_DEFINE (scm_append, "append", 0, 0, 1,
|
||||||
SCM res = SCM_EOL;
|
SCM res = SCM_EOL;
|
||||||
SCM *lloc = &res;
|
SCM *lloc = &res;
|
||||||
SCM arg = SCM_CAR (args);
|
SCM arg = SCM_CAR (args);
|
||||||
|
int argnum = 1;
|
||||||
args = SCM_CDR (args);
|
args = SCM_CDR (args);
|
||||||
while (!SCM_NULLP (args)) {
|
while (!SCM_NULLP (args)) {
|
||||||
while (SCM_CONSP (arg)) {
|
while (SCM_CONSP (arg)) {
|
||||||
|
@ -238,9 +239,10 @@ SCM_DEFINE (scm_append, "append", 0, 0, 1,
|
||||||
lloc = SCM_CDRLOC (*lloc);
|
lloc = SCM_CDRLOC (*lloc);
|
||||||
arg = SCM_CDR (arg);
|
arg = SCM_CDR (arg);
|
||||||
}
|
}
|
||||||
SCM_VALIDATE_NULL_OR_NIL (SCM_ARGn, arg);
|
SCM_VALIDATE_NULL_OR_NIL (argnum, arg);
|
||||||
arg = SCM_CAR (args);
|
arg = SCM_CAR (args);
|
||||||
args = SCM_CDR (args);
|
args = SCM_CDR (args);
|
||||||
|
argnum++;
|
||||||
};
|
};
|
||||||
*lloc = arg;
|
*lloc = arg;
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue