aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPhilipp Stephani2019-04-19 23:07:58 +0200
committerPhilipp Stephani2019-04-19 23:07:58 +0200
commite7cb6eea99a09335c8f5b935336ee6442468d853 (patch)
treed6f67e8541f32c300fa1c185e4a41de76f3fc0ac /src/lisp.h
parent7e7d62ea5e1a33bdec82bce79ad27e10765e50f1 (diff)
downloademacs-e7cb6eea99a09335c8f5b935336ee6442468d853.tar.gz
emacs-e7cb6eea99a09335c8f5b935336ee6442468d853.zip
Remove some #ifdefs for user pointers.
Even if Emacs is compiled without module support, we don't have to comment out every bit of user pointer support. Defining the basic structures and functions and detecting user pointers in switch statements is harmless, and we're already doing the same for module functions. Removing these #ifdefs makes the code a bit easier to read. * src/lisp.h (PVEC_USER_PTR, struct Lisp_User_Ptr, USER_PTRP) (XUSER_PTR): Define unconditionally. * src/data.c (Ftype_of): * src/alloc.c (cleanup_vector): * src/print.c (print_vectorlike): * src/pdumper.c (dump_vectorlike): Remove #ifdef for user pointers.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 2aa767b86c2..c2cb89de9d5 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1097,9 +1097,7 @@ enum pvec_type
1097 PVEC_OVERLAY, 1097 PVEC_OVERLAY,
1098 PVEC_FINALIZER, 1098 PVEC_FINALIZER,
1099 PVEC_MISC_PTR, 1099 PVEC_MISC_PTR,
1100#ifdef HAVE_MODULES
1101 PVEC_USER_PTR, 1100 PVEC_USER_PTR,
1102#endif
1103 PVEC_PROCESS, 1101 PVEC_PROCESS,
1104 PVEC_FRAME, 1102 PVEC_FRAME,
1105 PVEC_WINDOW, 1103 PVEC_WINDOW,
@@ -2561,14 +2559,12 @@ xmint_pointer (Lisp_Object a)
2561 return XUNTAG (a, Lisp_Vectorlike, struct Lisp_Misc_Ptr)->pointer; 2559 return XUNTAG (a, Lisp_Vectorlike, struct Lisp_Misc_Ptr)->pointer;
2562} 2560}
2563 2561
2564#ifdef HAVE_MODULES
2565struct Lisp_User_Ptr 2562struct Lisp_User_Ptr
2566{ 2563{
2567 union vectorlike_header header; 2564 union vectorlike_header header;
2568 void (*finalizer) (void *); 2565 void (*finalizer) (void *);
2569 void *p; 2566 void *p;
2570} GCALIGNED_STRUCT; 2567} GCALIGNED_STRUCT;
2571#endif
2572 2568
2573/* A finalizer sentinel. */ 2569/* A finalizer sentinel. */
2574struct Lisp_Finalizer 2570struct Lisp_Finalizer
@@ -2627,7 +2623,6 @@ XOVERLAY (Lisp_Object a)
2627 return XUNTAG (a, Lisp_Vectorlike, struct Lisp_Overlay); 2623 return XUNTAG (a, Lisp_Vectorlike, struct Lisp_Overlay);
2628} 2624}
2629 2625
2630#ifdef HAVE_MODULES
2631INLINE bool 2626INLINE bool
2632USER_PTRP (Lisp_Object x) 2627USER_PTRP (Lisp_Object x)
2633{ 2628{
@@ -2640,7 +2635,6 @@ XUSER_PTR (Lisp_Object a)
2640 eassert (USER_PTRP (a)); 2635 eassert (USER_PTRP (a));
2641 return XUNTAG (a, Lisp_Vectorlike, struct Lisp_User_Ptr); 2636 return XUNTAG (a, Lisp_Vectorlike, struct Lisp_User_Ptr);
2642} 2637}
2643#endif
2644 2638
2645INLINE bool 2639INLINE bool
2646BIGNUMP (Lisp_Object x) 2640BIGNUMP (Lisp_Object x)