diff options
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index cab912e7401..02c19690adf 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -468,6 +468,9 @@ enum Lisp_Misc_Type | |||
| 468 | Lisp_Misc_Overlay, | 468 | Lisp_Misc_Overlay, |
| 469 | Lisp_Misc_Save_Value, | 469 | Lisp_Misc_Save_Value, |
| 470 | Lisp_Misc_Finalizer, | 470 | Lisp_Misc_Finalizer, |
| 471 | #ifdef HAVE_MODULES | ||
| 472 | Lisp_Misc_User_Ptr, | ||
| 473 | #endif | ||
| 471 | /* Currently floats are not a misc type, | 474 | /* Currently floats are not a misc type, |
| 472 | but let's define this in case we want to change that. */ | 475 | but let's define this in case we want to change that. */ |
| 473 | Lisp_Misc_Float, | 476 | Lisp_Misc_Float, |
| @@ -581,6 +584,12 @@ INLINE bool PROCESSP (Lisp_Object); | |||
| 581 | INLINE bool PSEUDOVECTORP (Lisp_Object, int); | 584 | INLINE bool PSEUDOVECTORP (Lisp_Object, int); |
| 582 | INLINE bool SAVE_VALUEP (Lisp_Object); | 585 | INLINE bool SAVE_VALUEP (Lisp_Object); |
| 583 | INLINE bool FINALIZERP (Lisp_Object); | 586 | INLINE bool FINALIZERP (Lisp_Object); |
| 587 | |||
| 588 | #ifdef HAVE_MODULES | ||
| 589 | INLINE bool USER_PTRP (Lisp_Object); | ||
| 590 | INLINE struct Lisp_User_Ptr *(XUSER_PTR) (Lisp_Object); | ||
| 591 | #endif | ||
| 592 | |||
| 584 | INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t, | 593 | INLINE void set_sub_char_table_contents (Lisp_Object, ptrdiff_t, |
| 585 | Lisp_Object); | 594 | Lisp_Object); |
| 586 | INLINE bool STRINGP (Lisp_Object); | 595 | INLINE bool STRINGP (Lisp_Object); |
| @@ -2230,6 +2239,18 @@ XSAVE_OBJECT (Lisp_Object obj, int n) | |||
| 2230 | return XSAVE_VALUE (obj)->data[n].object; | 2239 | return XSAVE_VALUE (obj)->data[n].object; |
| 2231 | } | 2240 | } |
| 2232 | 2241 | ||
| 2242 | #ifdef HAVE_MODULES | ||
| 2243 | struct Lisp_User_Ptr | ||
| 2244 | { | ||
| 2245 | ENUM_BF (Lisp_Misc_Type) type : 16; /* = Lisp_Misc_User_Ptr */ | ||
| 2246 | bool_bf gcmarkbit : 1; | ||
| 2247 | unsigned spacer : 15; | ||
| 2248 | |||
| 2249 | void (*finalizer) (void*); | ||
| 2250 | void *p; | ||
| 2251 | }; | ||
| 2252 | #endif | ||
| 2253 | |||
| 2233 | /* A finalizer sentinel. */ | 2254 | /* A finalizer sentinel. */ |
| 2234 | struct Lisp_Finalizer | 2255 | struct Lisp_Finalizer |
| 2235 | { | 2256 | { |
| @@ -2265,6 +2286,9 @@ union Lisp_Misc | |||
| 2265 | struct Lisp_Overlay u_overlay; | 2286 | struct Lisp_Overlay u_overlay; |
| 2266 | struct Lisp_Save_Value u_save_value; | 2287 | struct Lisp_Save_Value u_save_value; |
| 2267 | struct Lisp_Finalizer u_finalizer; | 2288 | struct Lisp_Finalizer u_finalizer; |
| 2289 | #ifdef HAVE_MODULES | ||
| 2290 | struct Lisp_User_Ptr u_user_ptr; | ||
| 2291 | #endif | ||
| 2268 | }; | 2292 | }; |
| 2269 | 2293 | ||
| 2270 | INLINE union Lisp_Misc * | 2294 | INLINE union Lisp_Misc * |
| @@ -2314,6 +2338,16 @@ XFINALIZER (Lisp_Object a) | |||
| 2314 | return & XMISC (a)->u_finalizer; | 2338 | return & XMISC (a)->u_finalizer; |
| 2315 | } | 2339 | } |
| 2316 | 2340 | ||
| 2341 | #ifdef HAVE_MODULES | ||
| 2342 | INLINE struct Lisp_User_Ptr * | ||
| 2343 | XUSER_PTR (Lisp_Object a) | ||
| 2344 | { | ||
| 2345 | eassert (USER_PTRP (a)); | ||
| 2346 | return & XMISC (a)->u_user_ptr; | ||
| 2347 | } | ||
| 2348 | #endif | ||
| 2349 | |||
| 2350 | |||
| 2317 | 2351 | ||
| 2318 | /* Forwarding pointer to an int variable. | 2352 | /* Forwarding pointer to an int variable. |
| 2319 | This is allowed only in the value cell of a symbol, | 2353 | This is allowed only in the value cell of a symbol, |
| @@ -2598,6 +2632,14 @@ FINALIZERP (Lisp_Object x) | |||
| 2598 | return MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Finalizer; | 2632 | return MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Finalizer; |
| 2599 | } | 2633 | } |
| 2600 | 2634 | ||
| 2635 | #ifdef HAVE_MODULES | ||
| 2636 | INLINE bool | ||
| 2637 | USER_PTRP (Lisp_Object x) | ||
| 2638 | { | ||
| 2639 | return MISCP (x) && XMISCTYPE (x) == Lisp_Misc_User_Ptr; | ||
| 2640 | } | ||
| 2641 | #endif | ||
| 2642 | |||
| 2601 | INLINE bool | 2643 | INLINE bool |
| 2602 | AUTOLOADP (Lisp_Object x) | 2644 | AUTOLOADP (Lisp_Object x) |
| 2603 | { | 2645 | { |
| @@ -3870,6 +3912,11 @@ Lisp_Object backtrace_top_function (void); | |||
| 3870 | extern bool let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol); | 3912 | extern bool let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol); |
| 3871 | extern bool let_shadows_global_binding_p (Lisp_Object symbol); | 3913 | extern bool let_shadows_global_binding_p (Lisp_Object symbol); |
| 3872 | 3914 | ||
| 3915 | #ifdef HAVE_MODULES | ||
| 3916 | /* Defined in alloc.c. */ | ||
| 3917 | extern Lisp_Object make_user_ptr (void (*finalizer) (void*), void *p); | ||
| 3918 | |||
| 3919 | #endif | ||
| 3873 | 3920 | ||
| 3874 | /* Defined in editfns.c. */ | 3921 | /* Defined in editfns.c. */ |
| 3875 | extern void insert1 (Lisp_Object); | 3922 | extern void insert1 (Lisp_Object); |