summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-02-12 23:36:48 +0100
committerMarek Olšák <maraeo@gmail.com>2011-02-12 23:36:48 +0100
commit685c3262b945a7f0e9f1f3a9409a12fdda08c828 (patch)
tree804d78141228a7386d1a77e28702b712ea21c77e /src/gallium
parent04521c158f54d7d3b541cb3a5c2d94e3f7f5a94d (diff)
r300g: typecast void* to unsigned correctly
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 47d4f4d784..2693043876 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -314,14 +314,16 @@ static void radeon_bomgr_destroy(struct pb_manager *_mgr)
FREE(mgr);
}
+#define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x) & 0xffffffff))
+
static unsigned handle_hash(void *key)
{
- return (unsigned)key;
+ return PTR_TO_UINT(key);
}
static int handle_compare(void *key1, void *key2)
{
- return !((int)key1 == (int)key2);
+ return PTR_TO_UINT(key1) == PTR_TO_UINT(key2);
}
struct pb_manager *radeon_bomgr_create(struct radeon_drm_winsys *rws)