summaryrefslogtreecommitdiff
path: root/src/fccharset.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-09-01 01:49:47 -0700
committerKeith Packard <keithp@neko.keithp.com>2006-09-01 01:49:47 -0700
commit18b6857c6476517db7932025847ae952feba758d (patch)
tree8df0411a3683e1520d8a504d55d397c56c8f6aa7 /src/fccharset.c
parentbc5e487f2a1ad9946aa5c6e19cd75794fc38d530 (diff)
Fix fc-lang to use new charset freezer API.
Charset freezer api now uses allocated object. Also required minor fixes to charset freezer code to remove assumption that all input charsets are persistant.
Diffstat (limited to 'src/fccharset.c')
-rw-r--r--src/fccharset.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/fccharset.c b/src/fccharset.c
index 43aa22c4..3dac4ce6 100644
--- a/src/fccharset.c
+++ b/src/fccharset.c
@@ -1169,7 +1169,7 @@ FcCharSetFindFrozen (FcCharSetFreezer *freezer, const FcCharSet *orig)
return NULL;
}
-static const FcCharSet *
+const FcCharSet *
FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs)
{
FcCharSet *b;
@@ -1177,10 +1177,6 @@ FcCharSetFreeze (FcCharSetFreezer *freezer, const FcCharSet *fcs)
FcCharLeaf *l;
int i;
- n = FcCharSetFindFrozen (freezer, fcs);
- if (n)
- return n;
-
b = FcCharSetCreate ();
if (!b)
goto bail0;
@@ -1217,7 +1213,7 @@ bail0:
return n;
}
-static FcCharSetFreezer *
+FcCharSetFreezer *
FcCharSetFreezerCreate (void)
{
FcCharSetFreezer *freezer;
@@ -1279,6 +1275,9 @@ FcCharSetSerializeAlloc (FcSerialize *serialize, const FcCharSet *cs)
if (!serialize->cs_freezer)
return FcFalse;
}
+ if (FcCharSetFindFrozen (serialize->cs_freezer, cs))
+ return FcTrue;
+
cs = FcCharSetFreeze (serialize->cs_freezer, cs);
}