diff options
| author | Eli Zaretskii | 2012-07-27 13:29:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2012-07-27 13:29:26 +0300 |
| commit | bcfbc9de654b0718d46349ca8ada284dba3dc761 (patch) | |
| tree | fd7dd334273e5e3906a00e6af5f9c7ba3186f886 /src | |
| parent | 3438fe218c77633ee2c5f106e3a335f906347247 (diff) | |
| download | emacs-bcfbc9de654b0718d46349ca8ada284dba3dc761.tar.gz emacs-bcfbc9de654b0718d46349ca8ada284dba3dc761.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/alloc.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 54b34eb5c00..ab870b56f1e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-07-27 Eli Zaretskii <eliz@gnu.org> | 1 | 2012-07-27 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * alloc.c (listn): Fix the order the arguments are consed onto the | ||
| 4 | list. | ||
| 5 | |||
| 3 | * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for | 6 | * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for |
| 4 | enumeration constants, as PURE and HEAP are too general, and clash | 7 | enumeration constants, as PURE and HEAP are too general, and clash |
| 5 | with other headers and sources, such as gmalloc.c and the | 8 | with other headers and sources, such as gmalloc.c and the |
diff --git a/src/alloc.c b/src/alloc.c index 27426cdff66..a551dd821b8 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2832,7 +2832,7 @@ listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...) | |||
| 2832 | objp[i] = va_arg (ap, Lisp_Object); | 2832 | objp[i] = va_arg (ap, Lisp_Object); |
| 2833 | va_end (ap); | 2833 | va_end (ap); |
| 2834 | 2834 | ||
| 2835 | for (i = 0, val = Qnil; i < count; i++) | 2835 | for (val = Qnil, i = count - 1; i >= 0; i--) |
| 2836 | { | 2836 | { |
| 2837 | if (type == CONSTYPE_PURE) | 2837 | if (type == CONSTYPE_PURE) |
| 2838 | val = pure_cons (objp[i], val); | 2838 | val = pure_cons (objp[i], val); |