From 9a3de505dc5377a47a6ccb29fe60343feb2f5b14 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 4 Feb 2010 13:16:24 +0800 Subject: egl: Convert drivers to use typecast macros. Use macros to define the standard typecasts. This saves lots of typings. --- src/egl/drivers/glx/egl_glx.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'src/egl/drivers/glx') diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c index 8e6b5b07a2..3cbfebe488 100644 --- a/src/egl/drivers/glx/egl_glx.c +++ b/src/egl/drivers/glx/egl_glx.c @@ -116,35 +116,14 @@ struct GLX_egl_config int index; }; -/** cast wrapper */ -static struct GLX_egl_driver * -GLX_egl_driver(_EGLDriver *drv) -{ - return (struct GLX_egl_driver *) drv; -} - -static struct GLX_egl_display * -GLX_egl_display(_EGLDisplay *dpy) -{ - return (struct GLX_egl_display *) dpy->DriverData; -} - -static struct GLX_egl_context * -GLX_egl_context(_EGLContext *ctx) -{ - return (struct GLX_egl_context *) ctx; -} - -static struct GLX_egl_surface * -GLX_egl_surface(_EGLSurface *surf) -{ - return (struct GLX_egl_surface *) surf; -} +/* standard typecasts */ +_EGL_DRIVER_STANDARD_TYPECASTS(GLX_egl) static int GLX_egl_config_index(_EGLConfig *conf) { - return ((struct GLX_egl_config *) conf)->index; + struct GLX_egl_config *GLX_conf = GLX_egl_config(conf); + return GLX_conf->index; } -- cgit v1.2.3