From 6089c5670b18a02fc2caca3e665d2bb7799dc4c8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 4 Jul 2011 20:09:36 -0700 Subject: [PATCH] * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes. Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally well either way, and we prefer signed to unsigned. --- src/ChangeLog | 4 ++++ src/lisp.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9ad7da46ecf..e4702b4316b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-07-05 Paul Eggert + * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes. + Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally + well either way, and we prefer signed to unsigned. + Random fixes. E.g., (random) never returned negative values. * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the subseconds part to the entropy, as that's a bit more random. diff --git a/src/lisp.h b/src/lisp.h index 762d34abb9c..2835302947f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -833,7 +833,7 @@ struct Lisp_String . */ struct vectorlike_header { - EMACS_UINT size; + EMACS_INT size; /* Pointer to the next vector-like object. It is generally a buffer or a Lisp_Vector alias, so for convenience it is a union instead of a @@ -1028,7 +1028,7 @@ struct Lisp_Bool_Vector struct Lisp_Subr { - EMACS_UINT size; + EMACS_INT size; union { Lisp_Object (*a0) (void); Lisp_Object (*a1) (Lisp_Object); -- 2.39.2