changeset: 4504:78738a40e31e5bb7d8ee5a1d0f8e27d025bcebb9
parent: 4502:0204391fc17cfbae2117a6ba5babd84081ac3834
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Jun 29 11:06:16 2008 +0200
files: lisp/ChangeLog lisp/descr-text.el
description:
Don't leak the Unihan database handle when looking up non-Han characters.
2008-06-29 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-char-unicode-data):
Don't leak the Unihan database handle when looking up non-Han
characters.
diff -r 0204391fc17cfbae2117a6ba5babd84081ac3834 -r
78738a40e31e5bb7d8ee5a1d0f8e27d025bcebb9 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-04 Aidan Kehoe <kehoea@parhasa
+2008-06-29 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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 <kehoea(a)parhasard.net>
* descr-text.el (describe-property-list):
diff -r 0204391fc17cfbae2117a6ba5babd84081ac3834 -r
78738a40e31e5bb7d8ee5a1d0f8e27d025bcebb9 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 @@ The list is null if CHAR isn't found in
(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 @@ character)")
(if (and (> (length (nth 0 fields)) 13)
(equal "<CJK Ideograph"
(substring (nth 0 fields) 0 14)))
- (if (and unihan-database-handle
+ (if (and describe-char-unihan-file
+ (setq unihan-database-handle
+ (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))
(setq unihan-match
(get-database (format "%04X" char)
unihan-database-handle)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches