comparison src/lisp.h @ 91720:929fde6550ca

(ASET): Use AREF, not ASLOT.
author Richard M. Stallman <rms@gnu.org>
date Sun, 10 Feb 2008 14:01:47 +0000
parents 23bd9edca21f
children b2df1fe6ce6d
comparison
equal deleted inserted replaced
91719:5718a4d5a354 91720:929fde6550ca
592 #define ASIZE(ARRAY) XVECTOR ((ARRAY))->size 592 #define ASIZE(ARRAY) XVECTOR ((ARRAY))->size
593 /* The IDX==IDX tries to detect when the macro argument is side-effecting. */ 593 /* The IDX==IDX tries to detect when the macro argument is side-effecting. */
594 #define ASET(ARRAY, IDX, VAL) \ 594 #define ASET(ARRAY, IDX, VAL) \
595 (eassert ((IDX) == (IDX)), \ 595 (eassert ((IDX) == (IDX)), \
596 eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \ 596 eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \
597 ASLOT ((ARRAY), (IDX)) = (VAL)) 597 AREF ((ARRAY), (IDX)) = (VAL))
598 598
599 /* Convenience macros for dealing with Lisp strings. */ 599 /* Convenience macros for dealing with Lisp strings. */
600 600
601 #define SDATA(string) (XSTRING (string)->data + 0) 601 #define SDATA(string) (XSTRING (string)->data + 0)
602 #define SREF(string, index) (SDATA (string)[index] + 0) 602 #define SREF(string, index) (SDATA (string)[index] + 0)