+2005-10-25 Jinghua Luo <sunmoon1997@gmail.com>
+ reviewed by: plam
+
+ * src/fccfg.c (FcConfigValues):
+
+ List iteration not needed in FcConfigValues, since it's building
+ up the list itself; we can just strip FcVoid elements during
+ construction.
+
2005-11-17 Patrick Lam <plam@mit.edu>
* src/fccfg.c (FcConfigValues):
FcConfigValues (FcPattern *p, FcExpr *e, FcValueBinding binding)
{
FcValueList *l;
- FcValueListPtr lp;
if (!e)
return 0;
l->next = FcValueListPtrCreateDynamic(0);
}
l->binding = binding;
- lp = FcValueListPtrCreateDynamic(l);
- while (FcValueListPtrU(lp) && FcValueListPtrU(lp)->value.type == FcTypeVoid)
+ if (l->value.type == FcTypeVoid)
{
- FcValueListPtr next = FcValueListPtrU(lp)->next;
+ FcValueList *next = FcValueListPtrU(l->next);
- if (lp.bank == FC_BANK_DYNAMIC)
- {
- FcMemFree (FC_MEM_VALLIST, sizeof (FcValueList));
- free (l);
- }
- lp = next;
- l = FcValueListPtrU (lp);
+ FcMemFree (FC_MEM_VALLIST, sizeof (FcValueList));
+ free (l);
+ l = next;
}
+
return l;
}