A complicated fix for a simple bug ...
2000-12-31 Andy Piper <andy(a)xemacs.org>
* window.c (allocate_window): use
make_image_instance_cache_hash_table.
(make_dummy_parent): ditto.
(Fset_window_configuration): ditto.
* glyphs.h (INSTANTIATOR_TYPE): new macro. declare new functions.
* glyphs.c (process_image_string_instantiator): use
INSTANTIATOR_TYPE.
(get_image_instantiator_governing_domain): ditto.
(normalize_image_instantiator): ditto.
(instantiate_image_instantiator): ditto.
(make_image_instance_1): ditto.
(image_instantiate): ditto. Key on glyph *and* instantiator type.
(instantiator_eq_equal): new function for use with instance hash
tables.
(instantiator_eq_hash): ditto.
(make_image_instance_cache_hash_table): create a suitable hash
table for storing image instances.
* elhash.h (hash_table_weakness): new internal weakness type
HASH_TABLE_KEY_CAR_VALUE_WEAK.
declare new functions.
* elhash.c (finish_marking_weak_hash_tables): introduce yet
another weakness type for glyphs.
(make_standard_lisp_hash_table): new function split out from
make_general_lisp_hash_table.
(make_lisp_hash_table): call make_standard_lisp_hash_table.
(hash_table_instantiate): ditto.
(Fmake_hash_table): ditto.
At 14:43 05/12/00 +0900, Yoshiki Hayashi wrote:
I don't think the assertion is wrong. The easiest way to
reproduce crash is xemacs -nw and evaluate following
expression. (substitute "white.xpm" to (locate-data-file
"xemacs.xpm") or some other xpm.)
(glyph-height
(make-glyph (vector 'xpm :data
(with-temp-buffer (insert-file-contents "white.xpm")
(buffer-string)))))
I have a feeling the implications of not fixing this would have been quite
fundamental.
andy
--------------------------------------------------------------
Dr Andy Piper
Principal Consultant, BEA Systems Ltd