diff options
author | José Fonseca <[email protected]> | 2011-05-19 16:49:49 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-05-19 16:49:49 +0100 |
commit | ec4dfc2aad16ed3d04f47657e9f2cb22e791d511 (patch) | |
tree | 20c9c1703f49e96ce7f1908bc8a101a9d583de9b /src/mapi/glapi/gen | |
parent | f4a98688113ef189ed2017b12d41915e2bc034de (diff) |
glapi: Implement SET_xxx as inline functions instead of macros.
In order to have the benefit of type checking, and detect missing
GLAPIENTRY keywords on public entrypoints.
Diffstat (limited to 'src/mapi/glapi/gen')
-rw-r--r-- | src/mapi/glapi/gen/gl_table.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py index c7cb5a40a1c..f590c76c3b2 100644 --- a/src/mapi/glapi/gen/gl_table.py +++ b/src/mapi/glapi/gen/gl_table.py @@ -171,7 +171,10 @@ class PrintRemapTable(gl_XML.gl_print_base): print '#define CALL_%s(disp, parameters) CALL_by_offset(disp, (%s), _gloffset_%s, parameters)' % (f.name, cast, f.name) print '#define GET_%s(disp) GET_by_offset(disp, _gloffset_%s)' % (f.name, f.name) - print '#define SET_%s(disp, fn) SET_by_offset(disp, _gloffset_%s, fn)' % (f.name, f.name) + print 'static void INLINE SET_%s(struct _glapi_table *disp, %s (GLAPIENTRYP fn)(%s)) {' % (f.name, f.return_type, arg_string) + print ' SET_by_offset(disp, _gloffset_%s, fn);' % (f.name) + print '}' + print if alias_functions: print '' |