Commit 4115d3f7 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(VECSIZE): Round up when dividing.

parent 407d2741
...@@ -550,9 +550,10 @@ struct Lisp_String ...@@ -550,9 +550,10 @@ struct Lisp_String
}; };
/* 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 that vector. */ of the shortest vector that would hold that struct. */
#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \ #define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \
- sizeof (Lisp_Object))) \ - sizeof (Lisp_Object)) \
+ sizeof(Lisp_Object) - 1) /* round up */ \
/ sizeof (Lisp_Object)) / sizeof (Lisp_Object))
struct Lisp_Vector struct Lisp_Vector
......
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