From: Stefan Monnier Date: Fri, 8 Feb 2008 16:18:45 +0000 (+0000) Subject: (concat): Move side effect outside of macro call. X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/68b587a6ead60e9bc02a0e912b793b88f3f63a44 (concat): Move side effect outside of macro call. (hash_clear): Use ASET. --- diff --git a/src/ChangeLog b/src/ChangeLog index 350e5573d1..a02c3e631f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-02-08 Stefan Monnier + + * fns.c (concat): Move side effect outside of macro call. + (hash_clear): Use ASET. + 2008-02-08 Richard Stallman * frame.c (Fdelete_frame): If FORCE, don't call hooks. diff --git a/src/fns.c b/src/fns.c index 3a12768e62..d3f128ea2d 100644 --- a/src/fns.c +++ b/src/fns.c @@ -727,7 +727,10 @@ concat (nargs, args, target_type, last_special) thisindex++; } else - elt = AREF (this, thisindex++); + { + elt = AREF (this, thisindex); + thisindex++; + } /* Store this element into the result. */ if (toindex < 0) @@ -737,7 +740,10 @@ concat (nargs, args, target_type, last_special) tail = XCDR (tail); } else if (VECTORP (val)) - AREF (val, toindex++) = elt; + { + ASET (val, toindex, elt); + toindex++; + } else { CHECK_NUMBER (elt); @@ -4239,7 +4245,7 @@ hash_clear (h) } for (i = 0; i < ASIZE (h->index); ++i) - AREF (h->index, i) = Qnil; + ASET (h->index, i, Qnil); h->next_free = make_number (0); h->count = 0;