aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2009-04-17 00:56:39 +0000
committerKenichi Handa2009-04-17 00:56:39 +0000
commitb50504f5359babca1c2b87311bbe6c1f52b35826 (patch)
tree672f6d57f1a628e406d4d3a5e08f2c05a3857997
parent873f4645aa3caaf2d0e5fe136f29600649315b31 (diff)
downloademacs-b50504f5359babca1c2b87311bbe6c1f52b35826.tar.gz
emacs-b50504f5359babca1c2b87311bbe6c1f52b35826.zip
(ftfont_pattern_entity): Return a newly allocated
entity even if the cache hits.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/ftfont.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b65956d6d3c..1a26bae8db2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-04-17 Kenichi Handa <handa@m17n.org>
2
3 * ftfont.c (ftfont_pattern_entity): Return a newly allocated
4 entity even if the cache hits.
5
12009-04-16 Andreas Schwab <schwab@linux-m68k.org> 62009-04-16 Andreas Schwab <schwab@linux-m68k.org>
2 7
3 * search.c (boyer_moore): Use zero as marker value for a possible 8 * search.c (boyer_moore): Use zero as marker value for a possible
diff --git a/src/ftfont.c b/src/ftfont.c
index 8b0bb06a886..fdc6bc03bca 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -208,7 +208,14 @@ ftfont_pattern_entity (p, extra)
208 cache = ftfont_lookup_cache (key, FTFONT_CACHE_FOR_ENTITY); 208 cache = ftfont_lookup_cache (key, FTFONT_CACHE_FOR_ENTITY);
209 entity = XCAR (cache); 209 entity = XCAR (cache);
210 if (! NILP (entity)) 210 if (! NILP (entity))
211 return entity; 211 {
212 Lisp_Object val = font_make_entity ();
213 int i;
214
215 for (i = 0; i < FONT_OBJLIST_INDEX; i++)
216 ASET (val, i, AREF (entity, i));
217 return val;
218 }
212 entity = font_make_entity (); 219 entity = font_make_entity ();
213 XSETCAR (cache, entity); 220 XSETCAR (cache, entity);
214 221