diff options
| author | Paul Eggert | 2019-05-17 18:41:22 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-05-17 18:43:28 -0700 |
| commit | 41bf865329bbc2411203e9a90bc8dfd93ed5ef31 (patch) | |
| tree | 4424d4296328d277b3e653ac1e0f3a6bae67df40 /src/lisp.h | |
| parent | 4fbcecfaef8a3773b605c183c4da66cdabb39eef (diff) | |
| download | emacs-41bf865329bbc2411203e9a90bc8dfd93ed5ef31.tar.gz emacs-41bf865329bbc2411203e9a90bc8dfd93ed5ef31.zip | |
Clean up and simplify image-type setup
This also fixes an unlikely hang involving a circular image
description.
* src/dispextern.h (struct image.type): Now pointer-to-const.
* src/image.c (struct image_type.init) [!WINDOWSNT]: Omit.
(IMAGE_TYPE_INIT): New macro.
(image_types): Now a small array-of-const, not a pointer.
(CACHE_IMAGE_TYPE): Remove; the code’s simpler without it.
(ADD_IMAGE_TYPE): Remove this macro, replacing with ...
(add_image_type): ... this equivalent function. All uses changed.
(define_image_type): Remove. All uses removed.
(valid_image_p): Use FOR_EACH_TAIL_SAFE to avoid Emacs hanging
if the user creates a circular description of an image.
(xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
(gif_type, imagemagick_type, svg_type, gs_type):
Remove; now done by image_types.
(init_imagemagick_functions): Remove decl of nonexistent function.
(gs_clear_image): Remove; all uses replaced by image_clear_image.
(initialize_image_type): New function, which captures a lot
of the previously-scattered WINDOWSNT ifdefs.
(lookup_image_type): Use it.
(reset_image_types): Remove. All uses removed.
(syms_of_image): Don’t worry about ignoring image_types for
pdumper, since it’s a constant now.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h index 77f23be66b5..876b757bf3f 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3643,7 +3643,6 @@ extern void init_fringe_once (void); | |||
| 3643 | 3643 | ||
| 3644 | /* Defined in image.c. */ | 3644 | /* Defined in image.c. */ |
| 3645 | extern int x_bitmap_mask (struct frame *, ptrdiff_t); | 3645 | extern int x_bitmap_mask (struct frame *, ptrdiff_t); |
| 3646 | extern void reset_image_types (void); | ||
| 3647 | extern void syms_of_image (void); | 3646 | extern void syms_of_image (void); |
| 3648 | 3647 | ||
| 3649 | #ifdef HAVE_JSON | 3648 | #ifdef HAVE_JSON |