diff options
Diffstat (limited to 'src/image.c')
-rw-r--r-- | src/image.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/image.c b/src/image.c index f09552c4017..41d72964631 100644 --- a/src/image.c +++ b/src/image.c @@ -3561,7 +3561,7 @@ anim_prune_animation_cache (Lisp_Object clear) { struct anim_cache *cache = *pcache; if (EQ (clear, Qt) - || (EQ (clear, Qnil) && timespec_cmp (old, cache->update_time) > 0) + || (NILP (clear) && timespec_cmp (old, cache->update_time) > 0) || EQ (clear, cache->spec)) { if (cache->handle) @@ -4373,7 +4373,7 @@ slurp_image (Lisp_Object filename, ptrdiff_t *size, const char *image_type) char *result = slurp_file (fd, size); if (result == NULL) image_error ("Error loading %s image `%s'", - make_unibyte_string (image_type, strlen (image_type)), + build_unibyte_string (image_type), file); return result; } @@ -4875,7 +4875,7 @@ xbm_read_bitmap_data (struct frame *f, char *contents, char *end, while (0) #define expect_ident(IDENT) \ - if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \ + if (LA1 == XBM_TK_IDENT && strcmp (buffer, IDENT) == 0) \ match (); \ else \ goto failure @@ -6069,9 +6069,7 @@ xpm_make_color_table_h (void (**put_func) (Lisp_Object, const char *, int, { *put_func = xpm_put_color_table_h; *get_func = xpm_get_color_table_h; - return make_hash_table (hashtest_equal, DEFAULT_HASH_SIZE, - DEFAULT_REHASH_SIZE, DEFAULT_REHASH_THRESHOLD, - Qnil, false); + return make_hash_table (&hashtest_equal, DEFAULT_HASH_SIZE, Weak_None, false); } static void @@ -6081,9 +6079,10 @@ xpm_put_color_table_h (Lisp_Object color_table, Lisp_Object color) { struct Lisp_Hash_Table *table = XHASH_TABLE (color_table); - Lisp_Object chars = make_unibyte_string (chars_start, chars_len), hash_code; + Lisp_Object chars = make_unibyte_string (chars_start, chars_len); - hash_lookup (table, chars, &hash_code); + hash_hash_t hash_code; + hash_lookup_get_hash (table, chars, &hash_code); hash_put (table, chars, color, hash_code); } @@ -6094,7 +6093,7 @@ xpm_get_color_table_h (Lisp_Object color_table, { struct Lisp_Hash_Table *table = XHASH_TABLE (color_table); ptrdiff_t i = - hash_lookup (table, make_unibyte_string (chars_start, chars_len), NULL); + hash_lookup (table, make_unibyte_string (chars_start, chars_len)); return i >= 0 ? HASH_VALUE (table, i) : Qnil; } @@ -6155,7 +6154,7 @@ xpm_load_image (struct frame *f, #define expect_ident(IDENT) \ if (LA1 == XPM_TK_IDENT \ - && strlen ((IDENT)) == len && memcmp ((IDENT), beg, len) == 0) \ + && strlen (IDENT) == len && memcmp (IDENT, beg, len) == 0) \ match (); \ else \ goto failure |