From 1a2f43d0db92546dab765bc947f70bc7d2e4fee0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 25 Sep 2011 14:04:04 -0700 Subject: [PATCH] * lisp.h (XSETSUBR): Revert, as the old version is needed if debugging is enabled. --- src/ChangeLog | 2 -- src/lisp.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cc6c01a4360..1769f91aaf2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -456,8 +456,6 @@ (struct Lisp_Marker): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough. (clip_to_bounds): Now an inline function, moved here from editfns.c. - (XSETSUBR): Use size of 0 since the actual size doesn't matter, - and using 0 avoids overflow. (GLYPH_CODE_P): Check for overflow in system types, subsuming the need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves. All callers changed. diff --git a/src/lisp.h b/src/lisp.h index ed8eb2720b5..2c54c9b41ed 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -664,7 +664,8 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper) #define XSETWINDOW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW)) #define XSETTERMINAL(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_TERMINAL)) /* XSETSUBR is special since Lisp_Subr lacks struct vectorlike_header. */ -#define XSETSUBR(a, b) XSETTYPED_PSEUDOVECTOR (a, b, 0, PVEC_SUBR) +#define XSETSUBR(a, b) \ + XSETTYPED_PSEUDOVECTOR (a, b, XSUBR (a)->size, PVEC_SUBR) #define XSETCOMPILED(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_COMPILED)) #define XSETBUFFER(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BUFFER)) #define XSETCHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_CHAR_TABLE)) -- 2.39.2