mapi: Make _glapi_get_stub work with "gl" or "mgl" prefix.
authorKyle Brenneman <kbrenneman@nvidia.com>
Mon, 28 Sep 2015 17:59:22 +0000 (11:59 -0600)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 2 Oct 2015 12:23:18 +0000 (13:23 +0100)
When USE_MGL_NAMESPACE is defined, _glapi_get_stub will check for the "m"
prefix before trying to skip it, so that "glFoo" and "mglFoo" are
equivalent.

This should let it work with all the places where something calls
_glapi_get_proc_offset with a hard-coded name that starts with the normal
"gl" prefix.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55552
Signed-off-by: Kyle Brenneman <kbrenneman@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
src/mapi/mapi_glapi.c

index 70605f3dfa1df43b3c882a54b880f8b4fb3f5a55..9f02edb7cd3a9e9ed7d8617e21b8aae1ba3aad97 100644 (file)
@@ -175,7 +175,7 @@ _glapi_get_stub(const char *name, int generate)
    const struct mapi_stub *stub;
 
 #ifdef USE_MGL_NAMESPACE
-   if (name)
+   if (name && name[0] == 'm')
       name++;
 #endif