mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-18 23:32:17 -08:00
src/c/list.d: in APPEND, add back error detection for non proper lists.
This commit is contained in:
parent
549f4b0e26
commit
2d675630e7
1 changed files with 8 additions and 0 deletions
|
|
@ -210,6 +210,10 @@ append_into(cl_object head, cl_object *tail, cl_object l)
|
|||
tail = append_into(head, tail, other);
|
||||
}
|
||||
if (narg) {
|
||||
if (!Null(*tail)) {
|
||||
/* (APPEND '(1 . 2) 3) */
|
||||
FEtype_error_proper_list(head);
|
||||
}
|
||||
*tail = cl_va_arg(rest);
|
||||
}
|
||||
@(return head)
|
||||
|
|
@ -223,6 +227,10 @@ ecl_append(cl_object x, cl_object y)
|
|||
if (!Null(x)) {
|
||||
tail = append_into(head, tail, x);
|
||||
}
|
||||
if (!Null(*tail)) {
|
||||
/* (APPEND '(1 . 2) 3) */
|
||||
FEtype_error_proper_list(head);
|
||||
}
|
||||
*tail = y;
|
||||
return head;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue