From 3164ac76229d9817120015401c1f532934d0a3e2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 5 Jun 2009 22:59:06 -0400 Subject: [PATCH] [xml] Intern more strings --- src/fcxml.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/fcxml.c b/src/fcxml.c index f74f4ef..7b0b287 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -102,7 +102,7 @@ FcExprCreateString (FcConfig *config, const FcChar8 *s) if (e) { e->op = FcOpString; - e->u.sval = FcStrCopy (s); + e->u.sval = FcStrStaticName (s); } return e; } @@ -162,7 +162,7 @@ FcExprCreateConst (FcConfig *config, const FcChar8 *constant) if (e) { e->op = FcOpConst; - e->u.constant = FcStrCopy (constant); + e->u.constant = FcStrStaticName (constant); } return e; } @@ -191,7 +191,6 @@ FcExprDestroy (FcExpr *e) case FcOpDouble: break; case FcOpString: - FcStrFree (e->u.sval); break; case FcOpMatrix: FcMatrixFree (e->u.mval); @@ -204,7 +203,6 @@ FcExprDestroy (FcExpr *e) case FcOpField: break; case FcOpConst: - FcStrFree (e->u.constant); break; case FcOpAssign: case FcOpAssignReplace: @@ -840,6 +838,7 @@ FcVStackPopAndDestroy (FcConfigParse *parse) break; case FcVStackString: case FcVStackFamily: + break; case FcVStackField: case FcVStackConstant: case FcVStackGlob: @@ -1920,7 +1919,7 @@ FcPopValue (FcConfigParse *parse) switch (vstack->tag) { case FcVStackString: - value.u.s = FcStrCopy (vstack->u.string); + value.u.s = FcStrStaticName (vstack->u.string); if (value.u.s) value.type = FcTypeString; break; -- 2.39.5