aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2016-11-29 13:12:24 -0800
committerPaul Eggert2016-11-29 13:12:55 -0800
commit36dbdedefa2372870313e219164ff9b3b7712e9e (patch)
treeeae45d92207a19bc0c1d21fab029030ffdaae302 /src
parent9221b77c9962cc5a4cb7310b54b5b3c2b1faa469 (diff)
downloademacs-36dbdedefa2372870313e219164ff9b3b7712e9e.tar.gz
emacs-36dbdedefa2372870313e219164ff9b3b7712e9e.zip
Pacify Sun C 5.14
* src/lisp.h (enum Lisp_Save_Type): Put SAVE_UNUSED, SAVED_INTEGER, SAVE_FUNCPOINTER, SAVE_POINTER, and SAVE_OBJECT into this enum rather than into an anonymous enum. This avoids diagnostics from Sun C 5.14 and is a bit clearer anyway.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/lisp.h b/src/lisp.h
index b4ddad1b2a6..6fbedd3b1f5 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2112,18 +2112,8 @@ struct Lisp_Overlay
2112 Lisp_Object plist; 2112 Lisp_Object plist;
2113 }; 2113 };
2114 2114
2115/* Types of data which may be saved in a Lisp_Save_Value. */ 2115/* Number of bits needed to store one of the values
2116 2116 SAVE_UNUSED..SAVE_OBJECT. */
2117enum
2118 {
2119 SAVE_UNUSED,
2120 SAVE_INTEGER,
2121 SAVE_FUNCPOINTER,
2122 SAVE_POINTER,
2123 SAVE_OBJECT
2124 };
2125
2126/* Number of bits needed to store one of the above values. */
2127enum { SAVE_SLOT_BITS = 3 }; 2117enum { SAVE_SLOT_BITS = 3 };
2128 2118
2129/* Number of slots in a save value where save_type is nonzero. */ 2119/* Number of slots in a save value where save_type is nonzero. */
@@ -2133,8 +2123,15 @@ enum { SAVE_VALUE_SLOTS = 4 };
2133 2123
2134enum { SAVE_TYPE_BITS = SAVE_VALUE_SLOTS * SAVE_SLOT_BITS + 1 }; 2124enum { SAVE_TYPE_BITS = SAVE_VALUE_SLOTS * SAVE_SLOT_BITS + 1 };
2135 2125
2126/* Types of data which may be saved in a Lisp_Save_Value. */
2127
2136enum Lisp_Save_Type 2128enum Lisp_Save_Type
2137 { 2129 {
2130 SAVE_UNUSED,
2131 SAVE_INTEGER,
2132 SAVE_FUNCPOINTER,
2133 SAVE_POINTER,
2134 SAVE_OBJECT,
2138 SAVE_TYPE_INT_INT = SAVE_INTEGER + (SAVE_INTEGER << SAVE_SLOT_BITS), 2135 SAVE_TYPE_INT_INT = SAVE_INTEGER + (SAVE_INTEGER << SAVE_SLOT_BITS),
2139 SAVE_TYPE_INT_INT_INT 2136 SAVE_TYPE_INT_INT_INT
2140 = (SAVE_INTEGER + (SAVE_TYPE_INT_INT << SAVE_SLOT_BITS)), 2137 = (SAVE_INTEGER + (SAVE_TYPE_INT_INT << SAVE_SLOT_BITS)),
@@ -2152,6 +2149,12 @@ enum Lisp_Save_Type
2152 SAVE_TYPE_MEMORY = SAVE_TYPE_PTR_INT + (1 << (SAVE_TYPE_BITS - 1)) 2149 SAVE_TYPE_MEMORY = SAVE_TYPE_PTR_INT + (1 << (SAVE_TYPE_BITS - 1))
2153 }; 2150 };
2154 2151
2152/* SAVE_SLOT_BITS must be large enough to represent these values. */
2153verify (((SAVE_UNUSED | SAVE_INTEGER | SAVE_FUNCPOINTER
2154 | SAVE_POINTER | SAVE_OBJECT)
2155 >> SAVE_SLOT_BITS)
2156 == 0);
2157
2155/* Special object used to hold a different values for later use. 2158/* Special object used to hold a different values for later use.
2156 2159
2157 This is mostly used to package C integers and pointers to call 2160 This is mostly used to package C integers and pointers to call