fontconfig: Branch 'master'

[email protected] (Akira TAGOH)
Newsgroups gmane.comp.fonts.fontconfig
Message-ID <[email protected]>
 src/fccharset.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c37eeb8f1ff2cb8655a27545ca32cc50ab70e8d6
Author: Florent Rougon <[email protected]>
Date:   Mon Jun 5 10:58:41 2017 +0200

    FcCharSetHash(): use the 'numbers' values to compute the hash
    
    Before this commit, FcCharSetHash() repeatedly used the address of the
    'numbers' array of an FcCharSet to compute the FcCharSet hash, instead
    of the value of each array element. This is not good for even spreading
    of the FcCharSet objects among the various buckets of the hash table
    (and should thus reduce performance). This bug appears to have been
    mistakenly introduced in commit
    cd2ec1a940888ebcbd323a8000d2fcced41ddf9e (June 2005).

diff --git a/src/fccharset.c b/src/fccharset.c
index 3f17892..6e69f66 100644
--- a/src/fccharset.c
+++ b/src/fccharset.c
@@ -1113,7 +1113,7 @@ FcCharSetHash (FcCharSet *fcs)
 	hash = ((hash << 1) | (hash >> 31)) ^ FcCharLeafHash (FcCharSetLeaf(fcs,i));
     /* hash in numbers */
     for (i = 0; i < fcs->num; i++)
-	hash = ((hash << 1) | (hash >> 31)) ^ *FcCharSetNumbers(fcs);
+	hash = ((hash << 1) | (hash >> 31)) ^ FcCharSetNumbers(fcs)[i];
     return hash;
 }
 
_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.