changeset 91667:b3e6289494fb

(concat): Move side effect outside of macro call. (hash_clear): Use ASET.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 08 Feb 2008 16:18:45 +0000
parents 2229d6434820
children aeadaa72f7b1
files src/ChangeLog src/fns.c
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Feb 08 16:00:55 2008 +0000
+++ b/src/ChangeLog	Fri Feb 08 16:18:45 2008 +0000
@@ -1,3 +1,8 @@
+2008-02-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* fns.c (concat): Move side effect outside of macro call.
+	(hash_clear): Use ASET.
+
 2008-02-08  Richard Stallman  <rms@gnu.org>
 
 	* frame.c (Fdelete_frame): If FORCE, don't call hooks.
--- a/src/fns.c	Fri Feb 08 16:00:55 2008 +0000
+++ b/src/fns.c	Fri Feb 08 16:18:45 2008 +0000
@@ -727,7 +727,10 @@
 		thisindex++;
 	      }
 	    else
-	      elt = AREF (this, thisindex++);
+	      {
+		elt = AREF (this, thisindex);
+		thisindex++;
+	      }
 
 	    /* Store this element into the result.  */
 	    if (toindex < 0)
@@ -737,7 +740,10 @@
 		tail = XCDR (tail);
 	      }
 	    else if (VECTORP (val))
-	      AREF (val, toindex++) = elt;
+	      {
+		ASET (val, toindex, elt);
+		toindex++;
+	      }
 	    else
 	      {
 		CHECK_NUMBER (elt);
@@ -4239,7 +4245,7 @@
 	}
 
       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;