Fix the source integer type of casts to pointers
requested to merge akihiko.odaki/virglrenderer:fix-the-source-types-of-casts-to-pointers into master
Converting from valid pointer to void to intptr_t
and uintptr_t
,
and then converting back to pointer to void will result in a pointer
which compares equal to the original pointer. Using another integer type
as intermediate would result in an implementation-defined behavior.
Especially using unsigned long for the purpose is problematic for
LLP64 model like Windows.
Signed-off-by: Akihiko Odaki akihiko.odaki@gmail.com