mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 19:31:02 -08:00
* lisp.h (XCONS, XSTRING, XSYMBOL, XFLOAT, XPROCESS, XWINDOW, XSUBR, XBUFFER):
Verify correct object type before returning pointer, using eassert. * frame.h (XFRAME): Likewise. * buffer.c (Frename_buffer, Fset_buffer_multibyte, swap_out_buffer_local_variables, Fmove_overlay): Don't apply XSYMBOL, XBUFFER, etc, to values that may be nil or of the wrong type. * data.c (set_internal): Likewise. * dispextern.h (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): Likewise. * fileio.c (auto_save_1): Likewise. * insdel.c (check_markers): Likewise. * marker.c (buf_charpos_to_bytepos, unchain_marker): Likewise. * undo.c (record_insert): Likewise. * vmsproc.c (child_sig): Likewise. * window.c (unshow_buffer, window_loop): Likewise. * xterm.c (x_erase_phys_cursor): Likewise.
This commit is contained in:
parent
326855a0f4
commit
8801a864d2
13 changed files with 63 additions and 32 deletions
16
src/lisp.h
16
src/lisp.h
|
|
@ -432,11 +432,11 @@ extern Lisp_Object make_number ();
|
|||
|
||||
/* Extract a value or address from a Lisp_Object. */
|
||||
|
||||
#define XCONS(a) ((struct Lisp_Cons *) XPNTR(a))
|
||||
#define XCONS(a) (eassert (GC_CONSP(a)),(struct Lisp_Cons *) XPNTR(a))
|
||||
#define XVECTOR(a) ((struct Lisp_Vector *) XPNTR(a))
|
||||
#define XSTRING(a) ((struct Lisp_String *) XPNTR(a))
|
||||
#define XSYMBOL(a) ((struct Lisp_Symbol *) XPNTR(a))
|
||||
#define XFLOAT(a) ((struct Lisp_Float *) 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))
|
||||
|
||||
/* Misc types. */
|
||||
#define XMISC(a) ((union Lisp_Misc *) XPNTR(a))
|
||||
|
|
@ -451,10 +451,10 @@ extern Lisp_Object make_number ();
|
|||
#define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd))
|
||||
|
||||
/* Pseudovector types. */
|
||||
#define XPROCESS(a) ((struct Lisp_Process *) XPNTR(a))
|
||||
#define XWINDOW(a) ((struct window *) XPNTR(a))
|
||||
#define XSUBR(a) ((struct Lisp_Subr *) XPNTR(a))
|
||||
#define XBUFFER(a) ((struct buffer *) XPNTR(a))
|
||||
#define XPROCESS(a) (eassert (GC_PROCESSP(a)),(struct Lisp_Process *) XPNTR(a))
|
||||
#define XWINDOW(a) (eassert (GC_WINDOWP(a)),(struct window *) XPNTR(a))
|
||||
#define XSUBR(a) (eassert (GC_SUBRP(a)),(struct Lisp_Subr *) XPNTR(a))
|
||||
#define XBUFFER(a) (eassert (GC_BUFFERP(a)),(struct buffer *) XPNTR(a))
|
||||
#define XCHAR_TABLE(a) ((struct Lisp_Char_Table *) XPNTR(a))
|
||||
#define XBOOL_VECTOR(a) ((struct Lisp_Bool_Vector *) XPNTR(a))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue