Commit 6af64513 authored by Paul Eggert's avatar Paul Eggert

* 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>.
parent 6e8aca60
2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
* 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 <gundaetiapo@gmail.com> (tiny change)
* lisp.h (functionp): New function (extracted from Ffunctionp).
......
......@@ -606,10 +606,8 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
#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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment