summaryrefslogtreecommitdiffstats
path: root/common/draw.h
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-02-29 19:01:54 +0100
committerAlon Levy <alevy@redhat.com>2012-03-04 10:50:38 +0200
commit5989e2d1c4fa997dc2dbd4ea331bf6e77a425aff (patch)
tree6901792524e1786eb1c3c6c2843d4451963b3812 /common/draw.h
parent534b71dfaaf78e8ab2991bbb105f5601f23e7e16 (diff)
downloadspice-5989e2d1c4fa997dc2dbd4ea331bf6e77a425aff.tar.gz
spice-5989e2d1c4fa997dc2dbd4ea331bf6e77a425aff.tar.xz
spice-5989e2d1c4fa997dc2dbd4ea331bf6e77a425aff.zip
mingw: use uintptr_t when converting a pointer to an int
win64 uses 32 bit long, so we cannot use a long to hold a 64 bit pointer. Thankfully, there's a [u]intptr_t type available exactly for these uses.
Diffstat (limited to 'common/draw.h')
-rw-r--r--common/draw.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/draw.h b/common/draw.h
index 793169ff..8b1206de 100644
--- a/common/draw.h
+++ b/common/draw.h
@@ -39,8 +39,8 @@
extern "C" {
#endif
-#define SPICE_GET_ADDRESS(addr) ((void *)(unsigned long)(addr))
-#define SPICE_SET_ADDRESS(addr, val) ((addr) = (unsigned long)(val))
+#define SPICE_GET_ADDRESS(addr) ((void *)(uintptr_t)(addr))
+#define SPICE_SET_ADDRESS(addr, val) ((addr) = (uintptr_t)(val))
typedef int32_t SPICE_FIXED28_4;