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.
This commit is contained in:
José Fonseca
2011-05-19 16:49:49 +01:00
parent f4a9868811
commit ec4dfc2aad
2 changed files with 3716 additions and 929 deletions
+4 -1
View File
@@ -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 ''
File diff suppressed because it is too large Load Diff