Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py

Issue 7523033: Eliminate a warning in a failure case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/mesa/MesaLib/src/mapi/glapi/glapi_dispatch.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py
===================================================================
--- third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py (revision 94205)
+++ third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py (working copy)
@@ -79,11 +79,6 @@
comma = ", "
- if f.return_type != 'void':
- dispatch = "RETURN_DISPATCH"
- else:
- dispatch = "DISPATCH"
-
need_proto = False
if not f.is_static_entry_point(name):
need_proto = True
@@ -97,12 +92,22 @@
print '%s %s KEYWORD2 NAME(%s)(%s)' % (keyword, f.return_type, n, f.get_parameter_string(name))
print '{'
- if p_string == "":
- print ' %s(%s, (), (F, "gl%s();\\n"));' \
- % (dispatch, f.name, name)
+ if f.return_type != 'void':
+ dispatch = "RETURN_DISPATCH"
+ if p_string == "":
+ print ' %s(%s, %s, (), (F, "gl%s();\\n"));' \
+ % (dispatch, f.return_type, f.name, name)
+ else:
+ print ' %s(%s, %s, (%s), (F, "gl%s(%s);\\n", %s));' \
+ % (dispatch, f.return_type, f.name, p_string, name, t_string, o_string)
else:
- print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \
- % (dispatch, f.name, p_string, name, t_string, o_string)
+ dispatch = "DISPATCH"
+ if p_string == "":
+ print ' %s(%s, (), (F, "gl%s();\\n"));' \
+ % (dispatch, f.name, name)
+ else:
+ print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \
+ % (dispatch, f.name, p_string, name, t_string, o_string)
print '}'
print ''
return
@@ -120,7 +125,8 @@
* NAME(n) - builds the final function name (usually add "gl" prefix)
* DISPATCH(func, args, msg) - code to do dispatch of named function.
* msg is a printf-style debug message.
- * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value
+ * RETURN_DISPATCH(type, func, args, msg) - code to do dispatch with a
+ * return value of type.
*
* Here is an example which generates the usual OpenGL functions:
* #define KEYWORD1
« no previous file with comments | « no previous file | third_party/mesa/MesaLib/src/mapi/glapi/glapi_dispatch.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698