src/c/list.d: in APPEND, add back error detection for non proper lists.

This commit is contained in:
Juan Jose Garcia Ripoll 2009-11-15 10:49:33 +01:00
parent 549f4b0e26
commit 2d675630e7

View file

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