From: Kenichi Handa Date: Fri, 17 Apr 2009 00:56:39 +0000 (+0000) Subject: (ftfont_pattern_entity): Return a newly allocated X-Git-Tag: emacs-pretest-23.0.93~106 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b50504f5359babca1c2b87311bbe6c1f52b35826;p=emacs.git (ftfont_pattern_entity): Return a newly allocated entity even if the cache hits. --- diff --git a/src/ChangeLog b/src/ChangeLog index b65956d6d3c..1a26bae8db2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-04-17 Kenichi Handa + + * ftfont.c (ftfont_pattern_entity): Return a newly allocated + entity even if the cache hits. + 2009-04-16 Andreas Schwab * 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) 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);