diff options
| author | Ken Raeburn | 2000-03-30 09:56:31 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2000-03-30 09:56:31 +0000 |
| commit | 8801a864d2f7d9b6a77dfffa606f27f338127582 (patch) | |
| tree | 470499e90d35dabee56b08f00c6841a886dccdee /src/lisp.h | |
| parent | 326855a0f45fe45c4ddd9000046ed6a9aa31534b (diff) | |
| download | emacs-8801a864d2f7d9b6a77dfffa606f27f338127582.tar.gz emacs-8801a864d2f7d9b6a77dfffa606f27f338127582.zip | |
* 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.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lisp.h b/src/lisp.h index 54a3bdd5855..13e734a73ea 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -432,11 +432,11 @@ extern Lisp_Object make_number (); | |||
| 432 | 432 | ||
| 433 | /* Extract a value or address from a Lisp_Object. */ | 433 | /* Extract a value or address from a Lisp_Object. */ |
| 434 | 434 | ||
| 435 | #define XCONS(a) ((struct Lisp_Cons *) XPNTR(a)) | 435 | #define XCONS(a) (eassert (GC_CONSP(a)),(struct Lisp_Cons *) XPNTR(a)) |
| 436 | #define XVECTOR(a) ((struct Lisp_Vector *) XPNTR(a)) | 436 | #define XVECTOR(a) ((struct Lisp_Vector *) XPNTR(a)) |
| 437 | #define XSTRING(a) ((struct Lisp_String *) XPNTR(a)) | 437 | #define XSTRING(a) (eassert (GC_STRINGP(a)),(struct Lisp_String *) XPNTR(a)) |
| 438 | #define XSYMBOL(a) ((struct Lisp_Symbol *) XPNTR(a)) | 438 | #define XSYMBOL(a) (eassert (GC_SYMBOLP(a)),(struct Lisp_Symbol *) XPNTR(a)) |
| 439 | #define XFLOAT(a) ((struct Lisp_Float *) XPNTR(a)) | 439 | #define XFLOAT(a) (eassert (GC_FLOATP(a)),(struct Lisp_Float *) XPNTR(a)) |
| 440 | 440 | ||
| 441 | /* Misc types. */ | 441 | /* Misc types. */ |
| 442 | #define XMISC(a) ((union Lisp_Misc *) XPNTR(a)) | 442 | #define XMISC(a) ((union Lisp_Misc *) XPNTR(a)) |
| @@ -451,10 +451,10 @@ extern Lisp_Object make_number (); | |||
| 451 | #define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd)) | 451 | #define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd)) |
| 452 | 452 | ||
| 453 | /* Pseudovector types. */ | 453 | /* Pseudovector types. */ |
| 454 | #define XPROCESS(a) ((struct Lisp_Process *) XPNTR(a)) | 454 | #define XPROCESS(a) (eassert (GC_PROCESSP(a)),(struct Lisp_Process *) XPNTR(a)) |
| 455 | #define XWINDOW(a) ((struct window *) XPNTR(a)) | 455 | #define XWINDOW(a) (eassert (GC_WINDOWP(a)),(struct window *) XPNTR(a)) |
| 456 | #define XSUBR(a) ((struct Lisp_Subr *) XPNTR(a)) | 456 | #define XSUBR(a) (eassert (GC_SUBRP(a)),(struct Lisp_Subr *) XPNTR(a)) |
| 457 | #define XBUFFER(a) ((struct buffer *) XPNTR(a)) | 457 | #define XBUFFER(a) (eassert (GC_BUFFERP(a)),(struct buffer *) XPNTR(a)) |
| 458 | #define XCHAR_TABLE(a) ((struct Lisp_Char_Table *) XPNTR(a)) | 458 | #define XCHAR_TABLE(a) ((struct Lisp_Char_Table *) XPNTR(a)) |
| 459 | #define XBOOL_VECTOR(a) ((struct Lisp_Bool_Vector *) XPNTR(a)) | 459 | #define XBOOL_VECTOR(a) ((struct Lisp_Bool_Vector *) XPNTR(a)) |
| 460 | 460 | ||