aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/gen/gl_table.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mapi/glapi/gen/gl_table.py')
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_table.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesalib/src/mapi/glapi/gen/gl_table.py b/mesalib/src/mapi/glapi/gen/gl_table.py
index 7f3b91513..67ee5e813 100644
--- a/mesalib/src/mapi/glapi/gen/gl_table.py
+++ b/mesalib/src/mapi/glapi/gen/gl_table.py
@@ -81,6 +81,7 @@ class PrintRemapTable(gl_XML.gl_print_base):
def printRealHeader(self):
print """
+#include "glapitable.h"
/**
* \\file main/dispatch.h
* Macros for handling GL dispatch tables.
@@ -101,6 +102,9 @@ class PrintRemapTable(gl_XML.gl_print_base):
return
def printBody(self, api):
+ print '#ifdef _MSC_VER'
+ print '#define INLINE __inline'
+ print '#endif'
print '#define CALL_by_offset(disp, cast, offset, parameters) \\'
print ' (*(cast (GET_by_offset(disp, offset)))) parameters'
print '#define GET_by_offset(disp, offset) \\'
@@ -183,11 +187,11 @@ class PrintRemapTable(gl_XML.gl_print_base):
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 '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 '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