]> git.eshelyaron.com Git - emacs.git/commit
Improve lookup efficiency of color cache and prevent leaking
authorPo Lu <luangruo@yahoo.com>
Fri, 27 May 2022 01:40:40 +0000 (09:40 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 27 May 2022 01:40:40 +0000 (09:40 +0800)
commitc0807daedc22812add26f9f9be8d9b68afac1217
treebd6855b19f3cd9d2abeec55eec93ad84d7850a1d
parent8dcebc96299149845d63e23f27c75a1ecc0b3538
Improve lookup efficiency of color cache and prevent leaking

* src/xterm.c (x_parse_color): Move recently used colors to the
start of the cache and free unused entries when there are too
many.
(x_term_init, x_delete_display): Initialize and free new fields.
* src/xterm.h (struct x_display_info): New field
`color_names_length'.
src/xterm.c
src/xterm.h