]> code.delx.au - gnu-emacs/commitdiff
(ftfont_pattern_entity): Return a newly allocated
authorKenichi Handa <handa@m17n.org>
Fri, 17 Apr 2009 00:56:39 +0000 (00:56 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 17 Apr 2009 00:56:39 +0000 (00:56 +0000)
entity even if the cache hits.

src/ChangeLog
src/ftfont.c

index b65956d6d3cebeaeb1e397869e43583fa8de8e92..1a26bae8db29801a05ec0afe008a6eea70095708 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-17  Kenichi Handa  <handa@m17n.org>
+
+       * ftfont.c (ftfont_pattern_entity): Return a newly allocated
+       entity even if the cache hits.
+
 2009-04-16  Andreas Schwab  <schwab@linux-m68k.org>
 
        * search.c (boyer_moore): Use zero as marker value for a possible
index 8b0bb06a886509e6b7b8f411ceeba56b56a8d2c2..fdc6bc03bca254847b207f3284a26e6891e55dce 100644 (file)
@@ -208,7 +208,14 @@ ftfont_pattern_entity (p, extra)
   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);