diff options
| author | Philipp Stephani | 2019-04-19 23:07:58 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2019-04-19 23:07:58 +0200 |
| commit | e7cb6eea99a09335c8f5b935336ee6442468d853 (patch) | |
| tree | d6f67e8541f32c300fa1c185e4a41de76f3fc0ac /src/alloc.c | |
| parent | 7e7d62ea5e1a33bdec82bce79ad27e10765e50f1 (diff) | |
| download | emacs-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/alloc.c')
| -rw-r--r-- | src/alloc.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index 70701d75d47..7f0443dc2ea 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3270,14 +3270,12 @@ cleanup_vector (struct Lisp_Vector *vector) | |||
| 3270 | /* sweep_buffer should already have unchained this from its buffer. */ | 3270 | /* sweep_buffer should already have unchained this from its buffer. */ |
| 3271 | eassert (! PSEUDOVEC_STRUCT (vector, Lisp_Marker)->buffer); | 3271 | eassert (! PSEUDOVEC_STRUCT (vector, Lisp_Marker)->buffer); |
| 3272 | } | 3272 | } |
| 3273 | #ifdef HAVE_MODULES | ||
| 3274 | else if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_USER_PTR)) | 3273 | else if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_USER_PTR)) |
| 3275 | { | 3274 | { |
| 3276 | struct Lisp_User_Ptr *uptr = PSEUDOVEC_STRUCT (vector, Lisp_User_Ptr); | 3275 | struct Lisp_User_Ptr *uptr = PSEUDOVEC_STRUCT (vector, Lisp_User_Ptr); |
| 3277 | if (uptr->finalizer) | 3276 | if (uptr->finalizer) |
| 3278 | uptr->finalizer (uptr->p); | 3277 | uptr->finalizer (uptr->p); |
| 3279 | } | 3278 | } |
| 3280 | #endif | ||
| 3281 | } | 3279 | } |
| 3282 | 3280 | ||
| 3283 | /* Reclaim space used by unmarked vectors. */ | 3281 | /* Reclaim space used by unmarked vectors. */ |