[Fontconfig] fontconfig: Branch 'master' - 2 commits

Akira TAGOH tagoh at kemper.freedesktop.org
Tue Dec 19 03:17:12 UTC 2017


 src/fchash.c  |    2 ++
 src/fcmatch.c |    2 ++
 2 files changed, 4 insertions(+)

New commits:
commit aa85a2b3b6b652c079e895865e800e3d9b60a5f5
Author: Akira TAGOH <akira at tagoh.org>
Date:   Tue Dec 19 12:16:48 2017 +0900

    Try to get current instance of FcConfig as far as possible

diff --git a/src/fcmatch.c b/src/fcmatch.c
index 95bb204..f06d98a 100644
--- a/src/fcmatch.c
+++ b/src/fcmatch.c
@@ -653,6 +653,8 @@ FcFontRenderPrepare (FcConfig	    *config,
 		if (!l)
 		    goto bail0;
 		dir = FcStrDirname (FcValueString (&l->value));
+		if (!config)
+			config = FcConfigGetCurrent ();
 		if (config && FcHashTableFind (config->alias_table, dir, (void **) &alias))
 		{
 		    FcChar8 *base = FcStrBasename (FcValueString (&l->value));
commit 0b59a65a71b5482aab63a2fe7eff2820f2512941
Author: Alexander Larsson <alexl at redhat.com>
Date:   Mon Dec 18 16:17:10 2017 +0100

    fchash: Fix replace
    
    When we replace a bucket in the hashtable we have to update the
    next pointer too, or we lose all the other elements that hashed to
    this key.

diff --git a/src/fchash.c b/src/fchash.c
index 5c1a281..ba6a453 100644
--- a/src/fchash.c
+++ b/src/fchash.c
@@ -182,6 +182,7 @@ FcHashTableAddInternal (FcHashTable *table,
 	{
 	    if (replace)
 	    {
+		bucket->next = b->next;
 		if (!fc_atomic_ptr_cmpexch (prev, b, bucket))
 		    goto retry;
 		bucket = b;
@@ -191,6 +192,7 @@ FcHashTableAddInternal (FcHashTable *table,
 	    goto destroy;
 	}
     }
+    bucket->next = NULL;
     if (!fc_atomic_ptr_cmpexch (prev, b, bucket))
 	goto retry;
 


More information about the Fontconfig mailing list