[Mesa-dev] [PATCH 35/38] glx/dri2: constify __DRI*Extension handling

Emil Velikov emil.l.velikov at gmail.com
Wed Feb 12 17:18:01 PST 2014


Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/glx/dri2_glx.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 116a6a6..ece51e5 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1115,20 +1115,20 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
 
    for (i = 0; extensions[i]; i++) {
       if ((strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0)) {
-	 psc->texBuffer = (__DRItexBufferExtension *) extensions[i];
+	 psc->texBuffer = (const __DRItexBufferExtension *) extensions[i];
 	 __glXEnableDirectExtension(&psc->base, "GLX_EXT_texture_from_pixmap");
       }
 
       if ((strcmp(extensions[i]->name, __DRI2_FLUSH) == 0)) {
-	 psc->f = (__DRI2flushExtension *) extensions[i];
+	 psc->f = (const __DRI2flushExtension *) extensions[i];
 	 /* internal driver extension, no GL extension exposed */
       }
 
       if ((strcmp(extensions[i]->name, __DRI2_CONFIG_QUERY) == 0))
-	 psc->config = (__DRI2configQueryExtension *) extensions[i];
+	 psc->config = (const __DRI2configQueryExtension *) extensions[i];
 
       if (((strcmp(extensions[i]->name, __DRI2_THROTTLE) == 0)))
-	 psc->throttle = (__DRI2throttleExtension *) extensions[i];
+	 psc->throttle = (const __DRI2throttleExtension *) extensions[i];
 
       /* DRI2 version 3 is also required because
        * GLX_ARB_create_context_robustness requires GLX_ARB_create_context.
@@ -1143,7 +1143,7 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
        */
       if (psc->dri2->base.version >= 3
           && strcmp(extensions[i]->name, __DRI2_RENDERER_QUERY) == 0) {
-         psc->rendererQuery = (__DRI2rendererQueryExtension *) extensions[i];
+         psc->rendererQuery = (const __DRI2rendererQueryExtension *) extensions[i];
          __glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer");
       }
    }
@@ -1224,9 +1224,9 @@ dri2CreateScreen(int screen, struct glx_display * priv)
 
    for (i = 0; extensions[i]; i++) {
       if (strcmp(extensions[i]->name, __DRI_CORE) == 0)
-	 psc->core = (__DRIcoreExtension *) extensions[i];
+	 psc->core = (const __DRIcoreExtension *) extensions[i];
       if (strcmp(extensions[i]->name, __DRI_DRI2) == 0)
-	 psc->dri2 = (__DRIdri2Extension *) extensions[i];
+	 psc->dri2 = (const __DRIdri2Extension *) extensions[i];
    }
 
    if (psc->core == NULL || psc->dri2 == NULL) {
-- 
1.8.5.4



More information about the mesa-dev mailing list