# HG changeset patch # User Stefan Monnier # Date 1191362127 0 # Node ID 96eb42c9e0e3bfc0a59edca5147b9629fd1c57f4 # Parent a0c901e4e64952a87825b7ba1df68049b2b2cfd5 * window.h (struct window): * window.c (struct save_window_data, struct saved_window): * termhooks.h (struct terminal): * process.h (struct Lisp_Process): * frame.h (struct frame): * buffer.h (struct buffer): * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table) (struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table): The size field of (pseudo)vectors is now unsigned. (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly. diff -r a0c901e4e649 -r 96eb42c9e0e3 src/ChangeLog --- a/src/ChangeLog Tue Oct 02 21:24:47 2007 +0000 +++ b/src/ChangeLog Tue Oct 02 21:55:27 2007 +0000 @@ -1,7 +1,19 @@ 2007-10-02 Stefan Monnier + * window.h (struct window): + * window.c (struct save_window_data, struct saved_window): + * termhooks.h (struct terminal): + * process.h (struct Lisp_Process): + * frame.h (struct frame): + * buffer.h (struct buffer): + * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table) + (struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table): + The size field of (pseudo)vectors is now unsigned. + (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly. + * lisp.h (struct Lisp_Hash_Table): Move non-traced elements at the end. Turn `count' into an integer. + * fns.c (make_hash_table, hash_put, hash_remove, hash_clear) (sweep_weak_table, sweep_weak_hash_tables, Fhash_table_count): * print.c (print_object) : `count' is an int. diff -r a0c901e4e649 -r 96eb42c9e0e3 src/alloc.c --- a/src/alloc.c Tue Oct 02 21:24:47 2007 +0000 +++ b/src/alloc.c Tue Oct 02 21:55:27 2007 +0000 @@ -2341,6 +2341,7 @@ /* Get rid of any bits that would cause confusion. */ XVECTOR (val)->size = 0; /* No Lisp_Object to trace in there. */ + /* Use XVECTOR (val) rather than `p' because p->size is not TRT. */ XSETPVECTYPE (XVECTOR (val), PVEC_BOOL_VECTOR); p = XBOOL_VECTOR (val); diff -r a0c901e4e649 -r 96eb42c9e0e3 src/buffer.h --- a/src/buffer.h Tue Oct 02 21:24:47 2007 +0000 +++ b/src/buffer.h Tue Oct 02 21:55:27 2007 +0000 @@ -455,7 +455,7 @@ Check out mark_buffer (alloc.c) to see why. */ - EMACS_INT size; + EMACS_UINT size; /* Next buffer, in chain of all buffers including killed buffers. This chain is used only for garbage collection, in order to diff -r a0c901e4e649 -r 96eb42c9e0e3 src/frame.h --- a/src/frame.h Tue Oct 02 21:24:47 2007 +0000 +++ b/src/frame.h Tue Oct 02 21:55:27 2007 +0000 @@ -74,7 +74,7 @@ struct frame { - EMACS_INT size; + EMACS_UINT size; struct Lisp_Vector *next; /* All Lisp_Object components must come first. diff -r a0c901e4e649 -r 96eb42c9e0e3 src/lisp.h --- a/src/lisp.h Tue Oct 02 21:24:47 2007 +0000 +++ b/src/lisp.h Tue Oct 02 21:55:27 2007 +0000 @@ -308,11 +308,11 @@ /* In the size word of a vector, this bit means the vector has been marked. */ -#define ARRAY_MARK_FLAG ((EMACS_INT) ((EMACS_UINT) 1 << (VALBITS + GCTYPEBITS - 1))) +#define ARRAY_MARK_FLAG ((EMACS_UINT) 1 << (BITS_PER_EMACS_INT - 1)) /* In the size word of a struct Lisp_Vector, this bit means it's really some other vector-like object. */ -#define PSEUDOVECTOR_FLAG ((ARRAY_MARK_FLAG >> 1) & ~ARRAY_MARK_FLAG) +#define PSEUDOVECTOR_FLAG ((ARRAY_MARK_FLAG >> 1)) /* In a pseudovector, the size field actually contains a word with one PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to @@ -733,7 +733,7 @@ struct Lisp_Vector { - EMACS_INT size; + EMACS_UINT size; struct Lisp_Vector *next; Lisp_Object contents[1]; }; @@ -840,7 +840,7 @@ pseudovector type information. It holds the size, too. The size counts the top, defalt, purpose, and parent slots. The last three are not counted if this is a sub char table. */ - EMACS_INT size; + EMACS_UINT size; struct Lisp_Vector *next; /* This holds a flag to tell if this is a top level char table (t) or a sub char table (nil). */ @@ -871,10 +871,10 @@ { /* This is the vector's size field. It doesn't have the real size, just the subtype information. */ - EMACS_INT vector_size; + EMACS_UINT vector_size; struct Lisp_Vector *next; /* This is the size in bits. */ - EMACS_INT size; + EMACS_UINT size; /* This contains the actual bits, packed into bytes. */ unsigned char data[1]; }; @@ -889,7 +889,7 @@ struct Lisp_Subr { - EMACS_INT size; + EMACS_UINT size; Lisp_Object (*function) (); short min_args, max_args; char *symbol_name; @@ -1000,7 +1000,7 @@ struct Lisp_Hash_Table { /* Vector fields. The hash table code doesn't refer to these. */ - EMACS_INT size; + EMACS_UINT size; struct Lisp_Vector *vec_next; /* Function used to compare keys. */ diff -r a0c901e4e649 -r 96eb42c9e0e3 src/process.h --- a/src/process.h Tue Oct 02 21:24:47 2007 +0000 +++ b/src/process.h Tue Oct 02 21:55:27 2007 +0000 @@ -34,7 +34,7 @@ struct Lisp_Process { - EMACS_INT size; + EMACS_UINT size; struct Lisp_Vector *v_next; /* Name of subprocess terminal. */ Lisp_Object tty_name; diff -r a0c901e4e649 -r 96eb42c9e0e3 src/termhooks.h --- a/src/termhooks.h Tue Oct 02 21:24:47 2007 +0000 +++ b/src/termhooks.h Tue Oct 02 21:55:27 2007 +0000 @@ -317,7 +317,7 @@ { /* The first two fields are really the header of a vector */ /* The terminal code does not refer to them. */ - EMACS_INT size; + EMACS_UINT size; struct Lisp_Vector *vec_next; /* Parameter alist of this terminal. */ diff -r a0c901e4e649 -r 96eb42c9e0e3 src/window.c --- a/src/window.c Tue Oct 02 21:24:47 2007 +0000 +++ b/src/window.c Tue Oct 02 21:55:27 2007 +0000 @@ -6049,7 +6049,7 @@ struct save_window_data { - EMACS_INT size_from_Lisp_Vector_struct; + EMACS_UINT size; struct Lisp_Vector *next_from_Lisp_Vector_struct; Lisp_Object frame_cols, frame_lines, frame_menu_bar_lines; Lisp_Object frame_tool_bar_lines; @@ -6072,7 +6072,7 @@ struct saved_window { /* these first two must agree with struct Lisp_Vector in lisp.h */ - EMACS_INT size_from_Lisp_Vector_struct; + EMACS_UINT size; struct Lisp_Vector *next_from_Lisp_Vector_struct; Lisp_Object window; diff -r a0c901e4e649 -r 96eb42c9e0e3 src/window.h --- a/src/window.h Tue Oct 02 21:24:47 2007 +0000 +++ b/src/window.h Tue Oct 02 21:55:27 2007 +0000 @@ -92,7 +92,7 @@ { /* The first two fields are really the header of a vector */ /* The window code does not refer to them. */ - EMACS_INT size; + EMACS_UINT size; struct Lisp_Vector *vec_next; /* The frame this window is on. */ Lisp_Object frame;