aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog12
-rw-r--r--src/alloc.c1
-rw-r--r--src/buffer.h2
-rw-r--r--src/frame.h2
-rw-r--r--src/lisp.h16
-rw-r--r--src/process.h2
-rw-r--r--src/termhooks.h2
-rw-r--r--src/window.c4
-rw-r--r--src/window.h2
9 files changed, 28 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a30815d2bd..c38a2e32f5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,7 +1,19 @@
2007-10-02 Stefan Monnier <[email protected]>
+ * 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.
diff --git a/src/alloc.c b/src/alloc.c
index a3c9ec40f0..a2b5d9d889 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2341,6 +2341,7 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */)
/* 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 --git a/src/buffer.h b/src/buffer.h
index ed99dc4ffb..3d34e7c321 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -455,7 +455,7 @@ struct buffer
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 --git a/src/frame.h b/src/frame.h
index 7865795801..c8463625cc 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -74,7 +74,7 @@ struct terminal;
struct frame
{
- EMACS_INT size;
+ EMACS_UINT size;
struct Lisp_Vector *next;
/* All Lisp_Object components must come first.
diff --git a/src/lisp.h b/src/lisp.h
index 6dd24813f0..bbad0b2822 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -308,11 +308,11 @@ typedef EMACS_INT Lisp_Object;
/* 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_String
struct Lisp_Vector
{
- EMACS_INT size;
+ EMACS_UINT size;
struct Lisp_Vector *next;
Lisp_Object contents[1];
};
@@ -840,7 +840,7 @@ struct Lisp_Char_Table
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 @@ struct Lisp_Bool_Vector
{
/* 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_Bool_Vector
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_Symbol
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 --git a/src/process.h b/src/process.h
index eaed95fe4b..c1b1bc01e3 100644
--- a/src/process.h
+++ b/src/process.h
@@ -34,7 +34,7 @@ Boston, MA 02110-1301, USA. */
struct Lisp_Process
{
- EMACS_INT size;
+ EMACS_UINT size;
struct Lisp_Vector *v_next;
/* Name of subprocess terminal. */
Lisp_Object tty_name;
diff --git a/src/termhooks.h b/src/termhooks.h
index 3368c906a2..7f58114c21 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -317,7 +317,7 @@ struct terminal
{
/* 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 --git a/src/window.c b/src/window.c
index ab9a15dde2..bd1f55b164 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6049,7 +6049,7 @@ zero means top of window, negative means relative to bottom of window. */)
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 save_window_data
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 --git a/src/window.h b/src/window.h
index c9ef865c4f..3b9107acaa 100644
--- a/src/window.h
+++ b/src/window.h
@@ -92,7 +92,7 @@ struct 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;