2007-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
+ * 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) <HASH_TABLE_P>: `count' is an int.
/* 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);
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
struct frame
{
- EMACS_INT size;
+ EMACS_UINT size;
struct Lisp_Vector *next;
/* All Lisp_Object components must come first.
/* 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
struct Lisp_Vector
{
- EMACS_INT size;
+ EMACS_UINT size;
struct Lisp_Vector *next;
Lisp_Object contents[1];
};
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). */
{
/* 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];
};
struct Lisp_Subr
{
- EMACS_INT size;
+ EMACS_UINT size;
Lisp_Object (*function) ();
short min_args, max_args;
char *symbol_name;
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. */
struct Lisp_Process
{
- EMACS_INT size;
+ EMACS_UINT size;
struct Lisp_Vector *v_next;
/* Name of subprocess terminal. */
Lisp_Object tty_name;
{
/* 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. */
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;
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;
{
/* 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;