Index: src/fcpat.c =================================================================== RCS file: /cvs/fontconfig/fontconfig/src/fcpat.c,v retrieving revision 1.25 diff -u -r1.25 fcpat.c --- src/fcpat.c 7 Dec 2004 01:36:26 -0000 1.25 +++ src/fcpat.c 31 Mar 2005 16:19:42 -0000 @@ -48,7 +48,7 @@ { switch (v.type) { case FcTypeString: - FcStrFree ((FcChar8 *) v.u.s); + //FcStrFree ((FcChar8 *) v.u.s); break; case FcTypeMatrix: FcMatrixFree ((FcMatrix *) v.u.m); @@ -69,7 +69,8 @@ { switch (v.type) { case FcTypeString: - v.u.s = FcStrCopy (v.u.s); + //v.u.s = FcStrCopy (v.u.s); + v.u.s = FcObjectStaticName(v.u.s); if (!v.u.s) v.type = FcTypeVoid; break; @@ -102,7 +103,7 @@ { switch (l->value.type) { case FcTypeString: - FcStrFree ((FcChar8 *) l->value.u.s); + //FcStrFree ((FcChar8 *) l->value.u.s); break; case FcTypeMatrix: FcMatrixFree ((FcMatrix *) l->value.u.m); @@ -148,7 +149,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 +339,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 +367,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 @@ -588,6 +580,7 @@ { int low, high, mid, c; + object = FcObjectStaticName(object); low = 0; high = p->num - 1; c = 1; @@ -595,7 +588,7 @@ while (low <= high) { mid = (low + high) >> 1; - c = strcmp (p->elts[mid].object, object); + c = p->elts[mid].object - object; if (c == 0) return mid; if (c < 0) @@ -774,7 +767,7 @@ bail2: switch (value.type) { case FcTypeString: - FcStrFree ((FcChar8 *) value.u.s); + //FcStrFree ((FcChar8 *) value.u.s); break; case FcTypeMatrix: FcMatrixFree ((FcMatrix *) value.u.m); @@ -1193,6 +1186,7 @@ b->next = 0; b->hash = hash; strcpy ((char *) (b + 1), name); + //fprintf(stderr, "Staticised %s\n", name); *p = b; return (char *) (b + 1); }