[Mesa-dev] [PATCH 34/38] glx/dri: constify __DRI*Extension handling

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


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

diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 3b7502d..a7ae92b 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -193,7 +193,7 @@ glXGetDriverConfig(const char *driverName)
    if (extensions) {
       for (int i = 0; extensions[i]; i++) {
          if (strcmp(extensions[i]->name, __DRI_CONFIG_OPTIONS) == 0)
-            return ((__DRIconfigOptionsExtension *)extensions[i])->xml;
+            return ((const __DRIconfigOptionsExtension *)extensions[i])->xml;
       }
    }
 
@@ -785,18 +785,18 @@ driBindExtensions(struct dri_screen *psc, const __DRIextension **extensions)
       /* No DRI2 support for swap_control at the moment, since SwapBuffers
        * is done by the X server */
       if (strcmp(extensions[i]->name, __DRI_SWAP_CONTROL) == 0) {
-	 psc->swapControl = (__DRIswapControlExtension *) extensions[i];
+	 psc->swapControl = (const __DRIswapControlExtension *) extensions[i];
 	 __glXEnableDirectExtension(&psc->base, "GLX_SGI_swap_control");
 	 __glXEnableDirectExtension(&psc->base, "GLX_MESA_swap_control");
       }
 
       if (strcmp(extensions[i]->name, __DRI_MEDIA_STREAM_COUNTER) == 0) {
-         psc->msc = (__DRImediaStreamCounterExtension *) extensions[i];
+         psc->msc = (const __DRImediaStreamCounterExtension *) extensions[i];
          __glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync");
       }
 
       if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) {
-	 psc->driCopySubBuffer = (__DRIcopySubBufferExtension *) extensions[i];
+	 psc->driCopySubBuffer = (const __DRIcopySubBufferExtension *) extensions[i];
 	 __glXEnableDirectExtension(&psc->base, "GLX_MESA_copy_sub_buffer");
       }
 
@@ -847,9 +847,9 @@ driCreateScreen(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_LEGACY) == 0)
-	 psc->legacy = (__DRIlegacyExtension *) extensions[i];
+	 psc->legacy = (const __DRIlegacyExtension *) extensions[i];
    }
 
    if (psc->core == NULL || psc->legacy == NULL)
-- 
1.8.5.4



More information about the mesa-dev mailing list