changeset 38474:86bc182c8651

* lisp.h (XVECTOR): Verify correct object type before returning a pointer.
author Ken Raeburn <raeburn@raeburn.org>
date Tue, 17 Jul 2001 16:44:16 +0000
parents f5a9d9707da5
children 916f157c7118
files src/ChangeLog src/lisp.h
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Jul 17 16:29:39 2001 +0000
+++ b/src/ChangeLog	Tue Jul 17 16:44:16 2001 +0000
@@ -3,6 +3,9 @@
 	* coding.c (setup_coding_system): Don't do any designation based
 	on reg_bits if charset is not yet defined.
 
+	* lisp.h (XVECTOR): Verify correct object type before returning a
+	pointer, using eassert.
+
 2001-07-17  Gerd Moellmann  <gerd@gnu.org>
 
 	* keyboard.c (KBD_BUFFER_SIZE) [!HAVE_WINDOW_SYSTEM]: Increase
--- a/src/lisp.h	Tue Jul 17 16:29:39 2001 +0000
+++ b/src/lisp.h	Tue Jul 17 16:44:16 2001 +0000
@@ -471,7 +471,7 @@
 /* Extract a value or address from a Lisp_Object.  */
 
 #define XCONS(a) (eassert (GC_CONSP(a)),(struct Lisp_Cons *) XPNTR(a))
-#define XVECTOR(a) ((struct Lisp_Vector *) XPNTR(a))
+#define XVECTOR(a) (eassert (GC_VECTORLIKEP(a)),(struct Lisp_Vector *) XPNTR(a))
 #define XSTRING(a) (eassert (GC_STRINGP(a)),(struct Lisp_String *) XPNTR(a))
 #define XSYMBOL(a) (eassert (GC_SYMBOLP(a)),(struct Lisp_Symbol *) XPNTR(a))
 #define XFLOAT(a) (eassert (GC_FLOATP(a)),(struct Lisp_Float *) XPNTR(a))