[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/lisp.h,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/lisp.h,v |
Date: |
Wed, 13 Feb 2008 15:10:59 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/02/13 15:10:59
Index: src/lisp.h
===================================================================
RCS file: /sources/emacs/emacs/src/lisp.h,v
retrieving revision 1.611
retrieving revision 1.612
diff -u -b -r1.611 -r1.612
--- src/lisp.h 12 Feb 2008 21:35:14 -0000 1.611
+++ src/lisp.h 13 Feb 2008 15:10:56 -0000 1.612
@@ -588,13 +588,17 @@
/* Convenience macros for dealing with Lisp arrays. */
-#define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX]
+#define ASLOT(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX]
#define ASIZE(ARRAY) XVECTOR ((ARRAY))->size
-/* The IDX==IDX tries to detect when the macro argument is side-effecting. */
+/* The IDX==IDX checks that the macro argument is not side-effecting. */
+#define AREF(ARRAY, IDX) \
+ (eassert ((IDX) == (IDX)), \
+ eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \
+ ASLOT (ARRAY, (IDX)))
#define ASET(ARRAY, IDX, VAL) \
(eassert ((IDX) == (IDX)), \
eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \
- AREF ((ARRAY), (IDX)) = (VAL))
+ ASLOT ((ARRAY), (IDX)) = (VAL))
/* Convenience macros for dealing with Lisp strings. */
@@ -686,12 +690,12 @@
#define CAR(c) \
(CONSP ((c)) ? XCAR ((c)) \
: NILP ((c)) ? Qnil \
- : wrong_type_argument (Qlistp, (c)))
+ : (wrong_type_argument (Qlistp, (c)), Qnil))
#define CDR(c) \
(CONSP ((c)) ? XCDR ((c)) \
: NILP ((c)) ? Qnil \
- : wrong_type_argument (Qlistp, (c)))
+ : (wrong_type_argument (Qlistp, (c)), Qnil))
/* Take the car or cdr of something whose type is not known. */
#define CAR_SAFE(c) \
@@ -1090,25 +1094,25 @@
/* Value is the key part of entry IDX in hash table H. */
-#define HASH_KEY(H, IDX) AREF ((H)->key_and_value, 2 * (IDX))
+#define HASH_KEY(H, IDX) ASLOT ((H)->key_and_value, 2 * (IDX))
/* Value is the value part of entry IDX in hash table H. */
-#define HASH_VALUE(H, IDX) AREF ((H)->key_and_value, 2 * (IDX) + 1)
+#define HASH_VALUE(H, IDX) ASLOT ((H)->key_and_value, 2 * (IDX) + 1)
/* Value is the index of the next entry following the one at IDX
in hash table H. */
-#define HASH_NEXT(H, IDX) AREF ((H)->next, (IDX))
+#define HASH_NEXT(H, IDX) ASLOT ((H)->next, (IDX))
/* Value is the hash code computed for entry IDX in hash table H. */
-#define HASH_HASH(H, IDX) AREF ((H)->hash, (IDX))
+#define HASH_HASH(H, IDX) ASLOT ((H)->hash, (IDX))
/* Value is the index of the element in hash table H that is the
start of the collision list at index IDX in the index vector of H. */
-#define HASH_INDEX(H, IDX) AREF ((H)->index, (IDX))
+#define HASH_INDEX(H, IDX) ASLOT ((H)->index, (IDX))
/* Value is the size of hash table H. */
@@ -2252,7 +2256,7 @@
extern void args_out_of_range P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
extern void args_out_of_range_3 P_ ((Lisp_Object, Lisp_Object,
Lisp_Object)) NO_RETURN;
-extern Lisp_Object wrong_type_argument P_ ((Lisp_Object, Lisp_Object))
NO_RETURN;
+extern void wrong_type_argument P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
extern void store_symval_forwarding P_ ((Lisp_Object, Lisp_Object,
Lisp_Object, struct buffer *));
extern Lisp_Object do_symval_forwarding P_ ((Lisp_Object));
- [Emacs-diffs] Changes to emacs/src/lisp.h,v, Miles Bader, 2008/02/01
- [Emacs-diffs] Changes to emacs/src/lisp.h,v, Dan Nicolaescu, 2008/02/09
- [Emacs-diffs] Changes to emacs/src/lisp.h,v, Stefan Monnier, 2008/02/09
- [Emacs-diffs] Changes to emacs/src/lisp.h,v, Richard M. Stallman, 2008/02/10
- [Emacs-diffs] Changes to emacs/src/lisp.h,v, Stefan Monnier, 2008/02/10
- [Emacs-diffs] Changes to emacs/src/lisp.h,v, Stefan Monnier, 2008/02/12
- [Emacs-diffs] Changes to emacs/src/lisp.h,v,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/src/lisp.h,v, Stefan Monnier, 2008/02/13
- [Emacs-diffs] Changes to emacs/src/lisp.h,v, Stefan Monnier, 2008/02/22
- [Emacs-diffs] Changes to emacs/src/lisp.h,v, Kim F. Storm, 2008/02/27