Mesa (gallium-mesa-7.4): glapi: update find_entry() for mangled names
Alan Hourihane
alanh at kemper.freedesktop.org
Thu Mar 26 17:36:06 UTC 2009
Module: Mesa
Branch: gallium-mesa-7.4
Commit: 0fea05915ad914c948fa821570423c958f613776
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0fea05915ad914c948fa821570423c958f613776
Author: Brian Paul <brianp at vmware.com>
Date: Sat Feb 21 16:07:52 2009 -0700
glapi: update find_entry() for mangled names
(cherry picked from commit 4447fddc82a2c0245e798c90492293d875d186d0)
---
src/mesa/glapi/glapi_getproc.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c
index 6d40b49..1238c4c 100644
--- a/src/mesa/glapi/glapi_getproc.c
+++ b/src/mesa/glapi/glapi_getproc.c
@@ -87,7 +87,13 @@ find_entry( const char * n )
GLuint i;
for (i = 0; static_functions[i].Name_offset >= 0; i++) {
const char *testName = gl_string_table + static_functions[i].Name_offset;
- if (strcmp(testName, n) == 0) {
+#ifdef MANGLE
+ /* skip the "m" prefix on the name */
+ if (strcmp(testName, n + 1) == 0)
+#else
+ if (strcmp(testName, n) == 0)
+#endif
+ {
return &static_functions[i];
}
}
More information about the mesa-commit
mailing list