From 4115d3f71e0c6ae8844ab8c8d502746e4a4c3cfb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 3 Feb 1996 02:33:12 +0000 Subject: [PATCH] (VECSIZE): Round up when dividing. --- src/lisp.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lisp.h b/src/lisp.h index 9fe189f36f5..ce48018d1ce 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -550,9 +550,10 @@ struct Lisp_String }; /* If a struct is made to look like a vector, this macro returns the length - of that vector. */ -#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \ - - sizeof (Lisp_Object))) \ + of the shortest vector that would hold that struct. */ +#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \ + - sizeof (Lisp_Object)) \ + + sizeof(Lisp_Object) - 1) /* round up */ \ / sizeof (Lisp_Object)) struct Lisp_Vector -- 2.39.2