* 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.
This commit is contained in:
Paul Eggert 2011-07-04 20:09:36 -07:00
parent d8ed26bd07
commit 6089c5670b
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,9 @@
2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
* 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.

View file

@ -833,7 +833,7 @@ struct Lisp_String
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8546>. */
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);