aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2003-01-06 00:47:38 +0000
committerRichard M. Stallman2003-01-06 00:47:38 +0000
commit222151aa9c5cc9a1c0c6a376b7e10024cefe5d65 (patch)
treeb553f0e002e0cd88b6dcbd4b93c19dbd8b0ff152 /src
parent42172a6ba0be481cced03016e1b88d180a518023 (diff)
downloademacs-222151aa9c5cc9a1c0c6a376b7e10024cefe5d65.tar.gz
emacs-222151aa9c5cc9a1c0c6a376b7e10024cefe5d65.zip
New misc type Lisp_Save_Value.
(enum Lisp_Misc_Type): Add Lisp_Misc_Save_Value. (XSAVE_VALUE): New macro. (struct Lisp_Save_Value): New data type. (union Lisp_Misc): Add u_save_value alternative. (make_save_value): Declared.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 79050d14981..a71779a31c4 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -146,6 +146,7 @@ enum Lisp_Misc_Type
146 Lisp_Misc_Some_Buffer_Local_Value, 146 Lisp_Misc_Some_Buffer_Local_Value,
147 Lisp_Misc_Overlay, 147 Lisp_Misc_Overlay,
148 Lisp_Misc_Kboard_Objfwd, 148 Lisp_Misc_Kboard_Objfwd,
149 Lisp_Misc_Save_Value,
149 /* Currently floats are not a misc type, 150 /* Currently floats are not a misc type,
150 but let's define this in case we want to change that. */ 151 but let's define this in case we want to change that. */
151 Lisp_Misc_Float, 152 Lisp_Misc_Float,
@@ -494,6 +495,7 @@ extern size_t pure_size;
494#define XBUFFER_LOCAL_VALUE(a) (&(XMISC(a)->u_buffer_local_value)) 495#define XBUFFER_LOCAL_VALUE(a) (&(XMISC(a)->u_buffer_local_value))
495#define XOVERLAY(a) (&(XMISC(a)->u_overlay)) 496#define XOVERLAY(a) (&(XMISC(a)->u_overlay))
496#define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd)) 497#define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd))
498#define XSAVE_VALUE(a) (&(XMISC(a)->u_save_value))
497 499
498/* Pseudovector types. */ 500/* Pseudovector types. */
499 501
@@ -1232,6 +1234,16 @@ struct Lisp_Kboard_Objfwd
1232 int offset; 1234 int offset;
1233 }; 1235 };
1234 1236
1237/* Hold a C pointer for later use.
1238 This type of object is used in the arg to record_unwind_protect. */
1239struct Lisp_Save_Value
1240 {
1241 int type : 16; /* = Lisp_Misc_Save_Value */
1242 int spacer : 16;
1243 void *pointer;
1244 int integer;
1245 };
1246
1235 1247
1236/* To get the type field of a union Lisp_Misc, use XMISCTYPE. 1248/* To get the type field of a union Lisp_Misc, use XMISCTYPE.
1237 It uses one of these struct subtypes to get the type field. */ 1249 It uses one of these struct subtypes to get the type field. */
@@ -1247,6 +1259,7 @@ union Lisp_Misc
1247 struct Lisp_Buffer_Local_Value u_buffer_local_value; 1259 struct Lisp_Buffer_Local_Value u_buffer_local_value;
1248 struct Lisp_Overlay u_overlay; 1260 struct Lisp_Overlay u_overlay;
1249 struct Lisp_Kboard_Objfwd u_kboard_objfwd; 1261 struct Lisp_Kboard_Objfwd u_kboard_objfwd;
1262 struct Lisp_Save_Value u_save_value;
1250 }; 1263 };
1251 1264
1252/* Lisp floating point type */ 1265/* Lisp floating point type */
@@ -2459,6 +2472,7 @@ extern int gc_in_progress;
2459extern Lisp_Object make_float P_ ((double)); 2472extern Lisp_Object make_float P_ ((double));
2460extern void display_malloc_warning P_ ((void)); 2473extern void display_malloc_warning P_ ((void));
2461extern int inhibit_garbage_collection P_ ((void)); 2474extern int inhibit_garbage_collection P_ ((void));
2475extern Lisp_Object make_save_value P_ ((void *, int));
2462extern void free_marker P_ ((Lisp_Object)); 2476extern void free_marker P_ ((Lisp_Object));
2463extern void free_cons P_ ((struct Lisp_Cons *)); 2477extern void free_cons P_ ((struct Lisp_Cons *));
2464extern void init_alloc_once P_ ((void)); 2478extern void init_alloc_once P_ ((void));