[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109780: * lisp.h (ASET): Remove atte
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109780: * lisp.h (ASET): Remove attempt to detect side effects. |
Date: |
Sat, 25 Aug 2012 22:21:04 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109780
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sat 2012-08-25 22:21:04 -0700
message:
* lisp.h (ASET): Remove attempt to detect side effects.
It was meant to be temporary and it often doesn't work,
because when IDX has side effects the behavior of IDX==IDX
is undefined. See Stefan Monnier in
<http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
modified:
src/ChangeLog
src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-08-26 03:30:56 +0000
+++ b/src/ChangeLog 2012-08-26 05:21:04 +0000
@@ -1,3 +1,11 @@
+2012-08-26 Paul Eggert <address@hidden>
+
+ * lisp.h (ASET): Remove attempt to detect side effects.
+ It was meant to be temporary and it often doesn't work,
+ because when IDX has side effects the behavior of IDX==IDX
+ is undefined. See Stefan Monnier in
+ <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
+
2012-08-26 Barry OReilly <address@hidden> (tiny change)
* lisp.h (functionp): New function (extracted from Ffunctionp).
=== modified file 'src/lisp.h'
--- a/src/lisp.h 2012-08-26 03:30:56 +0000
+++ b/src/lisp.h 2012-08-26 05:21:04 +0000
@@ -606,10 +606,8 @@
#define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX]
#define ASIZE(ARRAY) XVECTOR ((ARRAY))->header.size
-/* The IDX==IDX tries to detect when the macro argument is side-effecting. */
#define ASET(ARRAY, IDX, VAL) \
- (eassert ((IDX) == (IDX)), \
- eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \
+ (eassert (0 <= (IDX) && (IDX) < ASIZE (ARRAY)), \
XVECTOR (ARRAY)->contents[IDX] = (VAL))
/* Convenience macros for dealing with Lisp strings. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109780: * lisp.h (ASET): Remove attempt to detect side effects.,
Paul Eggert <=