summaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldisplay.h
diff options
context:
space:
mode:
authorChia-Wu <[email protected]>2009-07-31 07:28:56 -0600
committerBrian Paul <[email protected]>2009-07-31 07:30:13 -0600
commitdc516d6e2afe7f157dbe5aad1288e5624b27e093 (patch)
treebea322f3bd3eb06b866510cbe7441055e10ba157 /src/egl/main/egldisplay.h
parent826f1f9c6fd976ff36594e272c0a391187ca0bd8 (diff)
egl: Silence warnings on x86-64.
Casting an unsigned int to or from a pointer directly gives warnings on x86-64. Add wrappers to silence the warnings. Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/egl/main/egldisplay.h')
-rw-r--r--src/egl/main/egldisplay.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 372ed3cd79a..2ef5db8a184 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -125,4 +125,25 @@ _eglIsSurfaceLinked(_EGLSurface *surf)
}
+/**
+ * Cast an unsigned int to a pointer.
+ */
+static INLINE void *
+_eglUIntToPointer(unsigned int v)
+{
+ return (void *) ((uintptr_t) v);
+}
+
+
+/**
+ * Cast a pointer to an unsigned int. The pointer must be one that is
+ * returned by _eglUIntToPointer.
+ */
+static INLINE unsigned int
+_eglPointerToUInt(const void *p)
+{
+ return (unsigned int) ((uintptr_t) p);
+}
+
+
#endif /* EGLDISPLAY_INCLUDED */