Commit 4bb7141c authored by Andreas Schwab's avatar Andreas Schwab
Browse files

(VECSIZE): Use OFFSETOF.

parent 6f37a576
2007-04-29 Andreas Schwab <schwab@suse.de>
* lisp.h (VECSIZE): Use OFFSETOF.
2007-04-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 2007-04-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
   
* xdisp.c (try_window_reusing_current_matrix): Fix number of * xdisp.c (try_window_reusing_current_matrix): Fix number of
......
...@@ -735,9 +735,9 @@ struct Lisp_Vector ...@@ -735,9 +735,9 @@ struct Lisp_Vector
/* If a struct is made to look like a vector, this macro returns the length /* If a struct is made to look like a vector, this macro returns the length
of the shortest vector that would hold that struct. */ of the shortest vector that would hold that struct. */
#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \ #define VECSIZE(type) ((sizeof (type) \
- sizeof (Lisp_Object)) \ - OFFSETOF (struct Lisp_Vector, contents[0]) \
+ sizeof(Lisp_Object) - 1) /* round up */ \ + sizeof(Lisp_Object) - 1) /* round up */ \
/ sizeof (Lisp_Object)) / sizeof (Lisp_Object))
/* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields /* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields
......
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