switch (v->type)
{
case FcTypeString:
- new.u.s = fc_value_string(v);
+ new.u.s = FcValueString(v);
new.type = FcTypeString;
break;
case FcTypeCharSet:
- new.u.c = fc_value_charset(v);
+ new.u.c = FcValueCharSet(v);
new.type = FcTypeCharSet;
break;
case FcTypeLangSet:
- new.u.l = fc_value_langset(v);
+ new.u.l = FcValueLangSet(v);
new.type = FcTypeLangSet;
break;
default:
{
switch (v.type) {
case FcTypeString:
- v.u.s = FcStrCopy (v.u.s);
+ v.u.s = FcStrStaticName (v.u.s);
if (!v.u.s)
v.type = FcTypeVoid;
break;
static FcChar32
FcValueHash (const FcValue *v)
{
- switch (fc_storage_type(v)) {
+ switch (v->type) {
case FcTypeVoid:
return 0;
case FcTypeInteger:
case FcTypeDouble:
return FcDoubleHash (v->u.d);
case FcTypeString:
- return FcStringHash (fc_value_string(v));
+ return FcStringHash (FcValueString(v));
case FcTypeBool:
return (FcChar32) v->u.b;
case FcTypeMatrix:
FcDoubleHash (v->u.m->yx) ^
FcDoubleHash (v->u.m->yy));
case FcTypeCharSet:
- return (FcChar32) fc_value_charset(v)->num;
+ return (FcChar32) FcValueCharSet(v)->num;
case FcTypeFTFace:
return FcStringHash ((const FcChar8 *) ((FT_Face) v->u.f)->family_name) ^
FcStringHash ((const FcChar8 *) ((FT_Face) v->u.f)->style_name);
case FcTypeLangSet:
- return FcLangSetHash (fc_value_langset(v));
+ return FcLangSetHash (FcValueLangSet(v));
}
return FcFalse;
}
memset(new, 0, sizeof (FcValueList));
FcMemAlloc (FC_MEM_VALLIST, sizeof (FcValueList));
- /* dup string */
- if (value.type == FcTypeString)
- {
- value.u.s = FcStrStaticName (value.u.s);
- if (!value.u.s)
- value.type = FcTypeVoid;
- }
- else
- value = FcValueSave (value);
+ value = FcValueSave (value);
if (value.type == FcTypeVoid)
goto bail1;