From: Jason Rumney Date: Fri, 4 Apr 2008 12:08:14 +0000 (+0000) Subject: (uniscribe_check_otf): Rearrange loop for counting features. X-Git-Tag: emacs-pretest-23.0.90~6583 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0bfec76e4e3a4cc26742da409e0393733d7d079;p=emacs.git (uniscribe_check_otf): Rearrange loop for counting features. --- diff --git a/src/ChangeLog b/src/ChangeLog index 312183e42aa..45ac57b2f98 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,8 @@ 2008-04-04 Jason Rumney * w32uniscribe.c (uniscribe_check_otf): Fix last change. + (uniscribe_check_otf): Add GC protection before consing. + Rearrange loop for counting features. 2008-04-03 Stefan Monnier diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 62734d05cde..dbf26011ff1 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -612,7 +612,6 @@ int uniscribe_check_otf (font, otf_spec) unsigned short script_table, langsys_table, n_langs; unsigned short feature_index, n_features; DWORD tbl = feature_tables[i]; - Lisp_Object feature; /* Skip if no features requested from this table. */ if (NILP (features[i])) @@ -680,10 +679,9 @@ int uniscribe_check_otf (font, otf_spec) /* Check the features. Features may contain nil according to documentation in font_prop_validate_otf, so count them. */ n_match_features = 0; - rest = features[i]; - for (feature = XCAR (rest); CONSP (rest); feature = CAR_SAFE (rest)) + for (rest = features[i]; CONSP (rest); rest = XCDR (rest)) { - rest = XCDR (rest); + Lisp_Object feature = XCAR (rest); if (!NILP (feature)) n_match_features++; }