Index: fcpat.c =================================================================== RCS file: /cvs/fontconfig/fontconfig/src/fcpat.c,v retrieving revision 1.26 diff -u -r1.26 fcpat.c --- fcpat.c 31 Mar 2005 19:16:49 -0000 1.26 +++ fcpat.c 1 Apr 2005 12:15:55 -0000 @@ -48,7 +48,7 @@ { switch (v.type) { case FcTypeString: - FcStrFree ((FcChar8 *) v.u.s); + /* Don't free FcTypeString, as they are canonical strings */ break; case FcTypeMatrix: FcMatrixFree ((FcMatrix *) v.u.m); @@ -69,7 +69,7 @@ { switch (v.type) { case FcTypeString: - v.u.s = FcStrCopy (v.u.s); + v.u.s = FcObjectStaticName(v.u.s); if (!v.u.s) v.type = FcTypeVoid; break; @@ -102,7 +102,7 @@ { switch (l->value.type) { case FcTypeString: - FcStrFree ((FcChar8 *) l->value.u.s); + /* Don't free FcTypeStrings, are they are canonical */ break; case FcTypeMatrix: FcMatrixFree ((FcMatrix *) l->value.u.m); @@ -148,7 +148,7 @@ case FcTypeDouble: return va.u.d == vb.u.d; case FcTypeString: - return FcStrCmpIgnoreCase (va.u.s, vb.u.s) == 0; + return va.u.s == vb.u.s; case FcTypeBool: return va.u.b == vb.u.b; case FcTypeMatrix: @@ -338,15 +338,7 @@ new = e->list; for (l = h; l; l = l->next, new++) { - if (l->value.type == FcTypeString) - { - new->value.type = FcTypeString; - new->value.u.s = FcObjectStaticName (l->value.u.s); - } - else - { - new->value = FcValueSave (l->value); - } + new->value = FcValueSave (l->value); new->binding = l->binding; if (l->next) new->next = new + 1; @@ -374,8 +366,7 @@ for (l = e->list; l; l = l->next) { - if (l->value.type != FcTypeString) - FcValueDestroy (l->value); + FcValueDestroy (l->value); } /* XXX: Are we being too chummy with the implementation here to free(e) when it was actually the enclosing FcValueListAlign @@ -775,7 +766,7 @@ bail2: switch (value.type) { case FcTypeString: - FcStrFree ((FcChar8 *) value.u.s); + /* Don't free FcTypeString, they are canonical */ break; case FcTypeMatrix: FcMatrixFree ((FcMatrix *) value.u.m);