aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-10-02 21:55:27 +0000
committerStefan Monnier2007-10-02 21:55:27 +0000
commitd0fdb6daaec286bd55dd92e998c11beceda189bd (patch)
tree354d035730ec1bd27b3db9713b732e78e16cbe85
parent878f97ffedc5b4fc785beac809c3d4392f531eca (diff)
downloademacs-d0fdb6daaec286bd55dd92e998c11beceda189bd.tar.gz
emacs-d0fdb6daaec286bd55dd92e998c11beceda189bd.zip
* 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.
-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 a30815d2bd8..c38a2e32f56 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,7 +1,19 @@
12007-10-02 Stefan Monnier <monnier@iro.umontreal.ca> 12007-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * window.h (struct window):
4 * window.c (struct save_window_data, struct saved_window):
5 * termhooks.h (struct terminal):
6 * process.h (struct Lisp_Process):
7 * frame.h (struct frame):
8 * buffer.h (struct buffer):
9 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table)
10 (struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table):
11 The size field of (pseudo)vectors is now unsigned.
12 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly.
13
3 * lisp.h (struct Lisp_Hash_Table): Move non-traced elements at the end. 14 * lisp.h (struct Lisp_Hash_Table): Move non-traced elements at the end.
4 Turn `count' into an integer. 15 Turn `count' into an integer.
16
5 * fns.c (make_hash_table, hash_put, hash_remove, hash_clear) 17 * fns.c (make_hash_table, hash_put, hash_remove, hash_clear)
6 (sweep_weak_table, sweep_weak_hash_tables, Fhash_table_count): 18 (sweep_weak_table, sweep_weak_hash_tables, Fhash_table_count):
7 * print.c (print_object) <HASH_TABLE_P>: `count' is an int. 19 * print.c (print_object) <HASH_TABLE_P>: `count' is an int.
diff --git a/src/alloc.c b/src/alloc.c
index a3c9ec40f05..a2b5d9d889b 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. */)
2341 2341
2342 /* Get rid of any bits that would cause confusion. */ 2342 /* Get rid of any bits that would cause confusion. */
2343 XVECTOR (val)->size = 0; /* No Lisp_Object to trace in there. */ 2343 XVECTOR (val)->size = 0; /* No Lisp_Object to trace in there. */
2344 /* Use XVECTOR (val) rather than `p' because p->size is not TRT. */
2344 XSETPVECTYPE (XVECTOR (val), PVEC_BOOL_VECTOR); 2345 XSETPVECTYPE (XVECTOR (val), PVEC_BOOL_VECTOR);
2345 2346
2346 p = XBOOL_VECTOR (val); 2347 p = XBOOL_VECTOR (val);
diff --git a/src/buffer.h b/src/buffer.h
index ed99dc4ffb1..3d34e7c3217 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -455,7 +455,7 @@ struct buffer
455 455
456 Check out mark_buffer (alloc.c) to see why. */ 456 Check out mark_buffer (alloc.c) to see why. */
457 457
458 EMACS_INT size; 458 EMACS_UINT size;
459 459
460 /* Next buffer, in chain of all buffers including killed buffers. 460 /* Next buffer, in chain of all buffers including killed buffers.
461 This chain is used only for garbage collection, in order to 461 This chain is used only for garbage collection, in order to
diff --git a/src/frame.h b/src/frame.h
index 78657958014..c8463625cc9 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -74,7 +74,7 @@ struct terminal;
74 74
75struct frame 75struct frame
76{ 76{
77 EMACS_INT size; 77 EMACS_UINT size;
78 struct Lisp_Vector *next; 78 struct Lisp_Vector *next;
79 79
80 /* All Lisp_Object components must come first. 80 /* All Lisp_Object components must come first.
diff --git a/src/lisp.h b/src/lisp.h
index 6dd24813f0e..bbad0b28226 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -308,11 +308,11 @@ typedef EMACS_INT Lisp_Object;
308 308
309/* In the size word of a vector, this bit means the vector has been marked. */ 309/* In the size word of a vector, this bit means the vector has been marked. */
310 310
311#define ARRAY_MARK_FLAG ((EMACS_INT) ((EMACS_UINT) 1 << (VALBITS + GCTYPEBITS - 1))) 311#define ARRAY_MARK_FLAG ((EMACS_UINT) 1 << (BITS_PER_EMACS_INT - 1))
312 312
313/* In the size word of a struct Lisp_Vector, this bit means it's really 313/* In the size word of a struct Lisp_Vector, this bit means it's really
314 some other vector-like object. */ 314 some other vector-like object. */
315#define PSEUDOVECTOR_FLAG ((ARRAY_MARK_FLAG >> 1) & ~ARRAY_MARK_FLAG) 315#define PSEUDOVECTOR_FLAG ((ARRAY_MARK_FLAG >> 1))
316 316
317/* In a pseudovector, the size field actually contains a word with one 317/* In a pseudovector, the size field actually contains a word with one
318 PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to 318 PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to
@@ -733,7 +733,7 @@ struct Lisp_String
733 733
734struct Lisp_Vector 734struct Lisp_Vector
735 { 735 {
736 EMACS_INT size; 736 EMACS_UINT size;
737 struct Lisp_Vector *next; 737 struct Lisp_Vector *next;
738 Lisp_Object contents[1]; 738 Lisp_Object contents[1];
739 }; 739 };
@@ -840,7 +840,7 @@ struct Lisp_Char_Table
840 pseudovector type information. It holds the size, too. 840 pseudovector type information. It holds the size, too.
841 The size counts the top, defalt, purpose, and parent slots. 841 The size counts the top, defalt, purpose, and parent slots.
842 The last three are not counted if this is a sub char table. */ 842 The last three are not counted if this is a sub char table. */
843 EMACS_INT size; 843 EMACS_UINT size;
844 struct Lisp_Vector *next; 844 struct Lisp_Vector *next;
845 /* This holds a flag to tell if this is a top level char table (t) 845 /* This holds a flag to tell if this is a top level char table (t)
846 or a sub char table (nil). */ 846 or a sub char table (nil). */
@@ -871,10 +871,10 @@ struct Lisp_Bool_Vector
871 { 871 {
872 /* This is the vector's size field. It doesn't have the real size, 872 /* This is the vector's size field. It doesn't have the real size,
873 just the subtype information. */ 873 just the subtype information. */
874 EMACS_INT vector_size; 874 EMACS_UINT vector_size;
875 struct Lisp_Vector *next; 875 struct Lisp_Vector *next;
876 /* This is the size in bits. */ 876 /* This is the size in bits. */
877 EMACS_INT size; 877 EMACS_UINT size;
878 /* This contains the actual bits, packed into bytes. */ 878 /* This contains the actual bits, packed into bytes. */
879 unsigned char data[1]; 879 unsigned char data[1];
880 }; 880 };
@@ -889,7 +889,7 @@ struct Lisp_Bool_Vector
889 889
890struct Lisp_Subr 890struct Lisp_Subr
891 { 891 {
892 EMACS_INT size; 892 EMACS_UINT size;
893 Lisp_Object (*function) (); 893 Lisp_Object (*function) ();
894 short min_args, max_args; 894 short min_args, max_args;
895 char *symbol_name; 895 char *symbol_name;
@@ -1000,7 +1000,7 @@ struct Lisp_Symbol
1000struct Lisp_Hash_Table 1000struct Lisp_Hash_Table
1001{ 1001{
1002 /* Vector fields. The hash table code doesn't refer to these. */ 1002 /* Vector fields. The hash table code doesn't refer to these. */
1003 EMACS_INT size; 1003 EMACS_UINT size;
1004 struct Lisp_Vector *vec_next; 1004 struct Lisp_Vector *vec_next;
1005 1005
1006 /* Function used to compare keys. */ 1006 /* Function used to compare keys. */
diff --git a/src/process.h b/src/process.h
index eaed95fe4b7..c1b1bc01e37 100644
--- a/src/process.h
+++ b/src/process.h
@@ -34,7 +34,7 @@ Boston, MA 02110-1301, USA. */
34 34
35struct Lisp_Process 35struct Lisp_Process
36 { 36 {
37 EMACS_INT size; 37 EMACS_UINT size;
38 struct Lisp_Vector *v_next; 38 struct Lisp_Vector *v_next;
39 /* Name of subprocess terminal. */ 39 /* Name of subprocess terminal. */
40 Lisp_Object tty_name; 40 Lisp_Object tty_name;
diff --git a/src/termhooks.h b/src/termhooks.h
index 3368c906a2d..7f58114c219 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -317,7 +317,7 @@ struct terminal
317{ 317{
318 /* The first two fields are really the header of a vector */ 318 /* The first two fields are really the header of a vector */
319 /* The terminal code does not refer to them. */ 319 /* The terminal code does not refer to them. */
320 EMACS_INT size; 320 EMACS_UINT size;
321 struct Lisp_Vector *vec_next; 321 struct Lisp_Vector *vec_next;
322 322
323 /* Parameter alist of this terminal. */ 323 /* Parameter alist of this terminal. */
diff --git a/src/window.c b/src/window.c
index ab9a15dde2a..bd1f55b1648 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. */)
6049 6049
6050struct save_window_data 6050struct save_window_data
6051 { 6051 {
6052 EMACS_INT size_from_Lisp_Vector_struct; 6052 EMACS_UINT size;
6053 struct Lisp_Vector *next_from_Lisp_Vector_struct; 6053 struct Lisp_Vector *next_from_Lisp_Vector_struct;
6054 Lisp_Object frame_cols, frame_lines, frame_menu_bar_lines; 6054 Lisp_Object frame_cols, frame_lines, frame_menu_bar_lines;
6055 Lisp_Object frame_tool_bar_lines; 6055 Lisp_Object frame_tool_bar_lines;
@@ -6072,7 +6072,7 @@ struct save_window_data
6072struct saved_window 6072struct saved_window
6073{ 6073{
6074 /* these first two must agree with struct Lisp_Vector in lisp.h */ 6074 /* these first two must agree with struct Lisp_Vector in lisp.h */
6075 EMACS_INT size_from_Lisp_Vector_struct; 6075 EMACS_UINT size;
6076 struct Lisp_Vector *next_from_Lisp_Vector_struct; 6076 struct Lisp_Vector *next_from_Lisp_Vector_struct;
6077 6077
6078 Lisp_Object window; 6078 Lisp_Object window;
diff --git a/src/window.h b/src/window.h
index c9ef865c4f0..3b9107acaa2 100644
--- a/src/window.h
+++ b/src/window.h
@@ -92,7 +92,7 @@ struct window
92 { 92 {
93 /* The first two fields are really the header of a vector */ 93 /* The first two fields are really the header of a vector */
94 /* The window code does not refer to them. */ 94 /* The window code does not refer to them. */
95 EMACS_INT size; 95 EMACS_UINT size;
96 struct Lisp_Vector *vec_next; 96 struct Lisp_Vector *vec_next;
97 /* The frame this window is on. */ 97 /* The frame this window is on. */
98 Lisp_Object frame; 98 Lisp_Object frame;