diff options
| author | Paul Eggert | 2012-08-25 22:21:04 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-25 22:21:04 -0700 |
| commit | 6af64513413d7194cfa2d8308db2d73f6ed64bf4 (patch) | |
| tree | 8d1eb5db5c3eaf966838de8ebd68ff34dbefd8d3 /src | |
| parent | 6e8aca60a8a3efaf397eab15d8b0cff3720e83b1 (diff) | |
| download | emacs-6af64513413d7194cfa2d8308db2d73f6ed64bf4.tar.gz emacs-6af64513413d7194cfa2d8308db2d73f6ed64bf4.zip | |
* 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>.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/lisp.h | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 54fff9356f3..06682f4637e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2012-08-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * lisp.h (ASET): Remove attempt to detect side effects. | ||
| 4 | It was meant to be temporary and it often doesn't work, | ||
| 5 | because when IDX has side effects the behavior of IDX==IDX | ||
| 6 | is undefined. See Stefan Monnier in | ||
| 7 | <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>. | ||
| 8 | |||
| 1 | 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change) | 9 | 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change) |
| 2 | 10 | ||
| 3 | * lisp.h (functionp): New function (extracted from Ffunctionp). | 11 | * lisp.h (functionp): New function (extracted from Ffunctionp). |
diff --git a/src/lisp.h b/src/lisp.h index c44ba7be347..4437fa44b6d 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -606,10 +606,8 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper) | |||
| 606 | 606 | ||
| 607 | #define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX] | 607 | #define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX] |
| 608 | #define ASIZE(ARRAY) XVECTOR ((ARRAY))->header.size | 608 | #define ASIZE(ARRAY) XVECTOR ((ARRAY))->header.size |
| 609 | /* The IDX==IDX tries to detect when the macro argument is side-effecting. */ | ||
| 610 | #define ASET(ARRAY, IDX, VAL) \ | 609 | #define ASET(ARRAY, IDX, VAL) \ |
| 611 | (eassert ((IDX) == (IDX)), \ | 610 | (eassert (0 <= (IDX) && (IDX) < ASIZE (ARRAY)), \ |
| 612 | eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \ | ||
| 613 | XVECTOR (ARRAY)->contents[IDX] = (VAL)) | 611 | XVECTOR (ARRAY)->contents[IDX] = (VAL)) |
| 614 | 612 | ||
| 615 | /* Convenience macros for dealing with Lisp strings. */ | 613 | /* Convenience macros for dealing with Lisp strings. */ |