[xml] Intern more strings

This commit is contained in:
Behdad Esfahbod 2009-06-05 22:59:06 -04:00
parent 390c05e64a
commit 3164ac7622
1 changed files with 4 additions and 5 deletions

View File

@ -102,7 +102,7 @@ FcExprCreateString (FcConfig *config, const FcChar8 *s)
if (e) if (e)
{ {
e->op = FcOpString; e->op = FcOpString;
e->u.sval = FcStrCopy (s); e->u.sval = FcStrStaticName (s);
} }
return e; return e;
} }
@ -162,7 +162,7 @@ FcExprCreateConst (FcConfig *config, const FcChar8 *constant)
if (e) if (e)
{ {
e->op = FcOpConst; e->op = FcOpConst;
e->u.constant = FcStrCopy (constant); e->u.constant = FcStrStaticName (constant);
} }
return e; return e;
} }
@ -191,7 +191,6 @@ FcExprDestroy (FcExpr *e)
case FcOpDouble: case FcOpDouble:
break; break;
case FcOpString: case FcOpString:
FcStrFree (e->u.sval);
break; break;
case FcOpMatrix: case FcOpMatrix:
FcMatrixFree (e->u.mval); FcMatrixFree (e->u.mval);
@ -204,7 +203,6 @@ FcExprDestroy (FcExpr *e)
case FcOpField: case FcOpField:
break; break;
case FcOpConst: case FcOpConst:
FcStrFree (e->u.constant);
break; break;
case FcOpAssign: case FcOpAssign:
case FcOpAssignReplace: case FcOpAssignReplace:
@ -840,6 +838,7 @@ FcVStackPopAndDestroy (FcConfigParse *parse)
break; break;
case FcVStackString: case FcVStackString:
case FcVStackFamily: case FcVStackFamily:
break;
case FcVStackField: case FcVStackField:
case FcVStackConstant: case FcVStackConstant:
case FcVStackGlob: case FcVStackGlob:
@ -1920,7 +1919,7 @@ FcPopValue (FcConfigParse *parse)
switch (vstack->tag) { switch (vstack->tag) {
case FcVStackString: case FcVStackString:
value.u.s = FcStrCopy (vstack->u.string); value.u.s = FcStrStaticName (vstack->u.string);
if (value.u.s) if (value.u.s)
value.type = FcTypeString; value.type = FcTypeString;
break; break;