]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcpat.c
Attempt to fix makealias usage for build on Mac OS X.
[fontconfig.git] / src / fcpat.c
index 3eb8a73707ecae51e17373e7b16baffd49c16974..bf34c2e2c4c1869f6c12303792a4f065e60e17e1 100644 (file)
@@ -282,7 +282,13 @@ FcPatternDestroy (FcPattern *p)
     int                    i;
     FcPatternElt    *elts;
     
-    if (p->ref == FC_REF_CONSTANT || --p->ref > 0)
+    if (p->ref == FC_REF_CONSTANT)
+    {
+       FcCacheObjectDereference (p);
+       return;
+    }
+       
+    if (--p->ref > 0)
        return;
 
     elts = FcPatternElts (p);
@@ -491,7 +497,15 @@ FcPatternObjectAddWithBinding  (FcPattern  *p,
      * Make sure the stored type is valid for built-in objects
      */
     if (!FcObjectValidType (object, value.type))
+    {
+       if (FcDebug() & FC_DBG_OBJTYPES)
+       {
+           printf ("FcPattern object %s does not accept value ",
+                   FcObjectName (object));
+           FcValuePrint (value);
+       }
        goto bail1;
+    }
 
     new->value = value;
     new->binding = binding;
@@ -930,6 +944,8 @@ FcPatternReference (FcPattern *p)
 {
     if (p->ref != FC_REF_CONSTANT)
        p->ref++;
+    else
+       FcCacheObjectReference (p);
 }
 
 FcPattern *
@@ -1044,7 +1060,7 @@ void
 FcPatternFini (void)
 {
     FcStrStaticNameFini ();
-    FcObjectStaticNameFini ();
+    FcObjectFini ();
 }
 
 FcBool
@@ -1187,7 +1203,11 @@ FcValueListSerialize (FcSerialize *serialize, const FcValueList *vl)
        default:
            break;
        }
+       prev_serialized = vl_serialized;
        vl = vl->next;
     }
     return head_serialized;
 }
+#define __fcpat__
+#include "fcaliastail.h"
+#undef __fcpat__