From: Paul Eggert Date: Tue, 5 Jul 2011 03:09:36 +0000 (-0700) Subject: * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~180 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6089c5670b18a02fc2caca3e665d2bb7799dc4c8;p=emacs.git * 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. --- 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);