Commit bcfbc9de authored by Eli Zaretskii's avatar Eli Zaretskii

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.
parent 3438fe21
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
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment