aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/gen/gl_table.py
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-05-22 13:28:34 +0000
committermarha <marha@users.sourceforge.net>2011-05-22 13:28:34 +0000
commit52011cfedaa930d61d8f60b283a2051093727582 (patch)
treef433de26ee688bc1dca5ca97c567c9ffc0ac5d48 /mesalib/src/mapi/glapi/gen/gl_table.py
parent35484135119fcf55fe1cbb1fcdd0e035f581fcfb (diff)
downloadvcxsrv-52011cfedaa930d61d8f60b283a2051093727582.tar.gz
vcxsrv-52011cfedaa930d61d8f60b283a2051093727582.tar.bz2
vcxsrv-52011cfedaa930d61d8f60b283a2051093727582.zip
xserver xkeyboard-config libX11 randrproto pixman glproto mesa git update 22 May 2011
Diffstat (limited to 'mesalib/src/mapi/glapi/gen/gl_table.py')
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_table.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/mesalib/src/mapi/glapi/gen/gl_table.py b/mesalib/src/mapi/glapi/gen/gl_table.py
index 6325341b5..3f1707218 100644
--- a/mesalib/src/mapi/glapi/gen/gl_table.py
+++ b/mesalib/src/mapi/glapi/gen/gl_table.py
@@ -167,11 +167,18 @@ class PrintRemapTable(gl_XML.gl_print_base):
for f, index in abi_functions + functions:
arg_string = gl_XML.create_parameter_string( f.parameters, 0 )
- cast = '%s (GLAPIENTRYP)(%s)' % (f.return_type, arg_string)
- 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 'typedef %s (GLAPIENTRYP _glptr_%s)(%s);' % (f.return_type, f.name, arg_string)
+ print '#define CALL_%s(disp, parameters) \\' % (f.name)
+ print ' (* GET_%s(disp)) parameters' % (f.name)
+ print 'static INLINE _glptr_%s GET_%s(struct _glapi_table *disp) {' % (f.name, f.name)
+ print ' return (_glptr_%s) (GET_by_offset(disp, _gloffset_%s));' % (f.name, f.name)
+ print '}'
+ print
+ print 'static INLINE void 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 ''