src/alloc.c (listn): Fix the order the arguments are consed onto the list.
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
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);