]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcname.c
FcObjectValidType: tweak -1 checking
[fontconfig.git] / src / fcname.c
index d77eff6f7518d2785d8c634aae13525229f0796f..1b32b0ff617b3bb2006d073bfeafab645cdc58c6 100644 (file)
@@ -296,8 +296,6 @@ FcObjectValidType (FcObject object, FcType type)
 
     if (t) {
        switch (t->type) {
-       case -1:
-           return FcTrue;
        case FcTypeDouble:
        case FcTypeInteger:
            if (type == FcTypeDouble || type == FcTypeInteger)
@@ -308,7 +306,7 @@ FcObjectValidType (FcObject object, FcType type)
                return FcTrue;
            break;
        default:
-           if (type == t->type)
+           if (t->type == -1 || type == t->type)
                return FcTrue;
            break;
        }
@@ -511,7 +509,7 @@ FcNameUnregisterConstants (const FcConstant *consts, int nconsts)
 }
 
 const FcConstant *
-FcNameGetConstant (FcChar8 *string)
+FcNameGetConstant (const FcChar8 *string)
 {
     const FcConstantList    *l;
     int                            i;
@@ -526,7 +524,7 @@ FcNameGetConstant (FcChar8 *string)
 }
 
 FcBool
-FcNameConstant (FcChar8 *string, int *result)
+FcNameConstant (const FcChar8 *string, int *result)
 {
     const FcConstant   *c;