diff src/ftfont.c @ 103003:bf88e5d2f4af

(ftfont_pattern_entity): Return a newly allocated entity even if the cache hits.
author Kenichi Handa <handa@m17n.org>
date Fri, 17 Apr 2009 00:55:41 +0000
parents 18e317a87f12
children 8f0fbb48af5a
line wrap: on
line diff
--- a/src/ftfont.c	Thu Apr 16 18:45:20 2009 +0000
+++ b/src/ftfont.c	Fri Apr 17 00:55:41 2009 +0000
@@ -208,7 +208,14 @@
   cache = ftfont_lookup_cache (key, FTFONT_CACHE_FOR_ENTITY);
   entity = XCAR (cache);
   if (! NILP (entity))
-    return entity;
+    {
+      Lisp_Object val = font_make_entity ();
+      int i;
+
+      for (i = 0; i < FONT_OBJLIST_INDEX; i++)
+	ASET (val, i, AREF (entity, i));
+      return val;
+    }
   entity = font_make_entity ();
   XSETCAR (cache, entity);