# HG changeset patch # User Aidan Kehoe # Date 1214730376 -7200 # Node ID 78738a40e31e5bb7d8ee5a1d0f8e27d025bcebb9 # Parent 0204391fc17cfbae2117a6ba5babd84081ac3834 Don't leak the Unihan database handle when looking up non-Han characters. 2008-06-29 Aidan Kehoe * descr-text.el (describe-char-unicode-data): Don't leak the Unihan database handle when looking up non-Han characters. diff -r 0204391fc17c -r 78738a40e31e lisp/ChangeLog --- a/lisp/ChangeLog Wed Jun 04 21:57:49 2008 +0200 +++ b/lisp/ChangeLog Sun Jun 29 11:06:16 2008 +0200 @@ -1,3 +1,9 @@ +2008-06-29 Aidan Kehoe + + * descr-text.el (describe-char-unicode-data): + Don't leak the Unihan database handle when looking up non-Han + characters. + 2008-06-04 Aidan Kehoe * descr-text.el (describe-property-list): diff -r 0204391fc17c -r 78738a40e31e lisp/descr-text.el --- a/lisp/descr-text.el Wed Jun 04 21:57:49 2008 +0200 +++ b/lisp/descr-text.el Sun Jun 29 11:06:16 2008 +0200 @@ -729,16 +729,7 @@ (goto-char (point-min)) (let ((hex (format "%04X" char)) - found first last unihan-match unihan-info - (unihan-database-handle - (and describe-char-unihan-file - (open-database (unidata-generate-database-file-name - describe-char-unihan-file - (eighth (file-attributes - describe-char-unihan-file)) - unidata-database-format) - unidata-database-format - nil "r" #o644 'no-conversion-unix))) + found first last unihan-match unihan-info unihan-database-handle (coding-system-for-read 'no-conversion-unix)) (if (re-search-forward (concat "^" hex) nil t) (setq found t) @@ -920,7 +911,16 @@ (if (and (> (length (nth 0 fields)) 13) (equal "