]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcpat.c
[int] Remove fc_value_* macros that did nothing other than renaming
[fontconfig.git] / src / fcpat.c
index 188f560bfd6398a54ce3a9caaf515df47f274a6f..76263b655b479145c482888fe63176cacc0d5c0c 100644 (file)
@@ -75,15 +75,15 @@ FcValueCanonicalize (const FcValue *v)
     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:
@@ -98,7 +98,7 @@ FcValueSave (FcValue v)
 {
     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;
@@ -220,7 +220,7 @@ FcStringHash (const FcChar8 *s)
 static FcChar32
 FcValueHash (const FcValue *v)
 {
-    switch (fc_storage_type(v)) {
+    switch (v->type) {
     case FcTypeVoid:
        return 0;
     case FcTypeInteger:
@@ -228,7 +228,7 @@ FcValueHash (const FcValue *v)
     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:
@@ -237,12 +237,12 @@ FcValueHash (const FcValue *v)
                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;
 }
@@ -482,15 +482,7 @@ FcPatternObjectAddWithBinding  (FcPattern  *p,
 
     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;