changeset 14473:7c93a4ce40b0

(VECSIZE): Round up when dividing.
author Richard M. Stallman <rms@gnu.org>
date Sat, 03 Feb 1996 02:33:12 +0000
parents 8979515dac09
children 799da4d5aeb7
files src/lisp.h
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lisp.h	Sat Feb 03 01:03:27 1996 +0000
+++ b/src/lisp.h	Sat Feb 03 02:33:12 1996 +0000
@@ -550,9 +550,10 @@
   };
 
 /* 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