Mesa (master): wgl: Add const qualifier to global constant data.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu Apr 9 14:22:18 UTC 2009


Module: Mesa
Branch: master
Commit: 7e563200b88edd50e0bbd00ada27f3988146ee9c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e563200b88edd50e0bbd00ada27f3988146ee9c

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu Apr  9 10:54:00 2009 +0100

wgl: Add const qualifier to global constant data.

---

 .../state_trackers/wgl/shared/stw_arbpixelformat.c |    4 ++--
 .../state_trackers/wgl/shared/stw_getprocaddress.c |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c b/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c
index f563635..ead2c8a 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c
@@ -285,7 +285,7 @@ struct attrib_match_info
    BOOL exact;
 };
 
-static struct attrib_match_info attrib_match[] = {
+static const struct attrib_match_info attrib_match[] = {
 
    /* WGL_ARB_pixel_format */
    { WGL_DRAW_TO_WINDOW_ARB,      0, TRUE },
@@ -338,7 +338,7 @@ score_pixelformats(
    int expected_value )
 {
    uint i;
-   struct attrib_match_info *ami = NULL;
+   const struct attrib_match_info *ami = NULL;
    uint index;
 
    /* Find out if a given attribute should be considered for score calculation.
diff --git a/src/gallium/state_trackers/wgl/shared/stw_getprocaddress.c b/src/gallium/state_trackers/wgl/shared/stw_getprocaddress.c
index ac2d6fc..f15b950 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_getprocaddress.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_getprocaddress.c
@@ -40,7 +40,7 @@ struct extension_entry
 
 #define EXTENTRY(P) { #P, (PROC) P }
 
-static struct extension_entry extension_entries[] = {
+static const struct extension_entry extension_entries[] = {
 
    /* WGL_ARB_extensions_string */
    EXTENTRY( wglGetExtensionsStringARB ),
@@ -57,9 +57,9 @@ PROC
 stw_get_proc_address(
    LPCSTR lpszProc )
 {
-   struct extension_entry *entry;
+   const struct extension_entry *entry;
 
-   PROC p = (PROC) _glapi_get_proc_address( (const char *) lpszProc );
+   PROC p = (PROC) _glapi_get_proc_address( lpszProc );
    if (p)
       return p;
 




More information about the mesa-commit mailing list