[cogl-pango-glyph-cache] Fix compiler warning on 64-bit

gcc warns about casting a pointer to a guint because it is a different
size on 64-bit machines. However the pointer is only used as a hash so
it doesn't matter if we lose the most significant bits. The patch
makes it use GPOINTER_TO_UINT instead which first casts it to a gulong
and avoids the warning.
This commit is contained in:
Neil Roberts 2009-02-26 10:56:42 +00:00
parent 3425331cc1
commit ce83007c1d

View File

@ -129,7 +129,7 @@ cogl_pango_glyph_cache_hash_func (gconstpointer key)
number. We can safely directly compare the pointers because the
key holds a reference to the font so it is not possible that a
different font will have the same memory address */
return (guint) cache_key->font ^ cache_key->glyph;
return GPOINTER_TO_UINT (cache_key->font) ^ cache_key->glyph;
}
static gboolean