Fix listn introduced in 2012-07-27T06:04:35Z!dmantipov@yandex.ru.

src/alloc.c (listn): Fix the order the arguments are consed onto the list.
This commit is contained in:
Eli Zaretskii 2012-07-27 13:29:26 +03:00
parent 3438fe218c
commit bcfbc9de65
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2012-07-27 Eli Zaretskii <eliz@gnu.org>
* alloc.c (listn): Fix the order the arguments are consed onto the
list.
* lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
enumeration constants, as PURE and HEAP are too general, and clash
with other headers and sources, such as gmalloc.c and the

View file

@ -2832,7 +2832,7 @@ listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...)
objp[i] = va_arg (ap, Lisp_Object);
va_end (ap);
for (i = 0, val = Qnil; i < count; i++)
for (val = Qnil, i = count - 1; i >= 0; i--)
{
if (type == CONSTYPE_PURE)
val = pure_cons (objp[i], val);