Commit 437b2cb4 authored by Paul Eggert's avatar Paul Eggert

* lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.

parent 82cb60d3
2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
* lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
* lread.c: Integer overflow fixes.
(read_integer): Radix is now EMACS_INT, not int,
to improve quality of diagnostics for out-of-range radices.
......
......@@ -1980,10 +1980,7 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int);
#define DEFVAR_KBOARD(lname, vname, doc) \
do { \
static struct Lisp_Kboard_Objfwd ko_fwd; \
defvar_kboard (&ko_fwd, \
lname, \
(int)((char *)(&current_kboard->vname ## _) \
- (char *)current_kboard)); \
defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \
} while (0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment