Re: [PATCH 2/4] scaled fonts: Use wide enough type for pointer arithmetic

Adrian Johnson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 11/02/16 07:19, Simon Richter wrote:
>  struct _cairo_hash_entry {
> -    unsigned long hash;
> +    intptr_t hash;
>  };

The hash value is used for looking up the hash table (after performing a
hash % table_size). size_t would be a better type since the hash table
object can't exceed size_t. Scaled fonts uses a pointer as a convenient
means of generating a hash value. But the hash value in general is not
intended to contain a pointer.

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
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.