[cairo-commit] 2 commits - src/cairo-hash.c src/cairo-types-private.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 9 09:36:37 UTC 2022


 src/cairo-hash.c          |    2 +-
 src/cairo-types-private.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ec54603366a39a5ad12c489aaf0bbb85859fa7a9
Merge: 777d35fa8 82119ec2f
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Wed Mar 9 09:36:35 2022 +0000

    Merge branch 'issue-263-2' into 'master'
    
    Fix font count in Inkscape's win32 pdf export
    
    See merge request cairo/cairo!296

commit 82119ec2f38fc92ba711454d87558092f0ef4b32
Author: Nathan Lee <2431820-nathanal at users.noreply.gitlab.com>
Date:   Wed Mar 9 12:43:42 2022 +1100

    Fix font count in Inkscape's win32 pdf export
    
    Fix win32 hash comparison, where unsigned long is shorter than
    uintptr_t. Follow-up to 9fbf42754899898934bc8bf4f8eeacba37656fdc.

diff --git a/src/cairo-hash.c b/src/cairo-hash.c
index 151842eb6..a3cc452b7 100644
--- a/src/cairo-hash.c
+++ b/src/cairo-hash.c
@@ -340,7 +340,7 @@ _cairo_hash_table_lookup (cairo_hash_table_t *hash_table,
 {
     cairo_hash_entry_t *entry;
     unsigned long table_size, i, idx, step;
-    unsigned long hash = key->hash;
+    uintptr_t hash = key->hash;
 
     entry = hash_table->cache[hash & 31];
     if (entry && entry->hash == hash && hash_table->keys_equal (key, entry))
diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h
index 59404243b..8612172d8 100644
--- a/src/cairo-types-private.h
+++ b/src/cairo-types-private.h
@@ -117,8 +117,8 @@ struct _cairo_observer {
  *
  * A #cairo_hash_entry_t contains both a key and a value for
  * #cairo_hash_table_t. User-derived types for #cairo_hash_entry_t must
- * be type-compatible with this structure (eg. they must have an
- * unsigned long as the first parameter. The easiest way to get this
+ * be type-compatible with this structure (eg. they must have a
+ * uintptr_t as the first parameter. The easiest way to get this
  * is to use:
  *
  * 	typedef _my_entry {


More information about the cairo-commit mailing list