aboutsummaryrefslogtreecommitdiff
path: root/fontconfig
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig')
-rw-r--r--fontconfig/src/fcmatch.c15
-rw-r--r--fontconfig/src/fcobjs.h2
-rw-r--r--fontconfig/test/test-migration.c2
3 files changed, 6 insertions, 13 deletions
diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c
index 0c0a0670e..78255186f 100644
--- a/fontconfig/src/fcmatch.c
+++ b/fontconfig/src/fcmatch.c
@@ -245,16 +245,8 @@ FcCompareFilename (FcValue *v1, FcValue *v2)
return 3.0;
}
-static double
-FcCompareHash (FcValue *v1, FcValue *v2)
-{
- const FcChar8 *s1 = FcValueString (v1), *s2 = FcValueString (v2);
- /* Do not match an empty string */
- if (!s1 || !s2 || !s1[0] || !s2[0])
- return 1.0;
- return FcCompareString (v1, v2);
-}
+/* Define priorities to -1 for objects that don't have a compare function. */
#define PRI_NULL(n) \
PRI_ ## n ## _STRONG = -1, \
@@ -269,7 +261,6 @@ FcCompareHash (FcValue *v1, FcValue *v2)
#define PRI_FcCompareCharSet(n) PRI1(n)
#define PRI_FcCompareLang(n) PRI1(n)
#define PRI_FcComparePostScript(n) PRI1(n)
-#define PRI_FcCompareHash(n) PRI1(n)
#define PRI_FcCompareSizeRange(n) PRI1(n)
#define FC_OBJECT(NAME, Type, Cmp) PRI_##Cmp(NAME)
@@ -280,6 +271,9 @@ typedef enum _FcMatcherPriorityDummy {
#undef FC_OBJECT
+
+/* Canonical match priority order. */
+
#undef PRI1
#define PRI1(n) \
PRI_ ## n, \
@@ -287,7 +281,6 @@ typedef enum _FcMatcherPriorityDummy {
PRI_ ## n ## _WEAK = PRI_ ## n
typedef enum _FcMatcherPriority {
- PRI1(HASH),
PRI1(FILE),
PRI1(FONTFORMAT),
PRI1(SCALABLE),
diff --git a/fontconfig/src/fcobjs.h b/fontconfig/src/fcobjs.h
index dc3d83404..bfdf4b58b 100644
--- a/fontconfig/src/fcobjs.h
+++ b/fontconfig/src/fcobjs.h
@@ -66,6 +66,6 @@ FC_OBJECT (LCD_FILTER, FcTypeInteger, NULL)
FC_OBJECT (NAMELANG, FcTypeString, NULL)
FC_OBJECT (FONT_FEATURES, FcTypeString, NULL)
FC_OBJECT (PRGNAME, FcTypeString, NULL)
-FC_OBJECT (HASH, FcTypeString, FcCompareHash) /* deprecated */
+FC_OBJECT (HASH, FcTypeString, NULL) /* deprecated */
FC_OBJECT (POSTSCRIPT_NAME, FcTypeString, FcComparePostScript)
/* ^-------------- Add new objects here. */
diff --git a/fontconfig/test/test-migration.c b/fontconfig/test/test-migration.c
index 9366edbf1..bcd805df8 100644
--- a/fontconfig/test/test-migration.c
+++ b/fontconfig/test/test-migration.c
@@ -56,7 +56,7 @@ mkdir_p(const char *dir)
if (strlen (dir) == 0)
return FcFalse;
- parent = (char *) FcStrDirname (dir);
+ parent = (char *) FcStrDirname ((const FcChar8 *)dir);
if (!parent)
return FcFalse;
if (access (parent, F_OK) == 0)