diff options
Diffstat (limited to 'xorg-server/hw/xwin/glx/gen_gl_wrappers.py')
-rw-r--r-- | xorg-server/hw/xwin/glx/gen_gl_wrappers.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py index e2d960ec6..d4beee230 100644 --- a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py +++ b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py @@ -67,7 +67,7 @@ if dispatchheader : fh = open(dispatchheader) dispatchh = fh.readlines() - dispatch_regex = re.compile(r'#define\sSET_(\S*)\(') + dispatch_regex = re.compile(r'(?:#define|static\s+INLINE\s+void)\s+SET_([^\()]+)\(') for line in dispatchh : line = line.strip() @@ -239,10 +239,12 @@ for w in sorted(wrappers.keys()) : if wrappers[w]['category'].startswith('VERSION_1_0') or wrappers[w]['category'].startswith('VERSION_1_1') : if staticwrappers : print 'static', - print returntype + ' ' + funcname + 'Wrapper(' + arglist + ')' + print returntype + ' __stdcall ' + funcname + 'Wrapper(' + arglist + ')' print '{' + print '#ifdef _DEBUG' print ' if (glxWinDebugSettings.enable' + prefix.upper() + 'callTrace) ErrorF("'+ funcname + '\\n");' print ' glWinDirectProcCalls++;' + print '#endif' if returntype.lower() == 'void' : print ' ' + funcname + '(', else : @@ -257,7 +259,7 @@ for w in sorted(wrappers.keys()) : else: if staticwrappers : print 'static', - print returntype + ' ' + funcname + 'Wrapper(' + arglist + ')' + print returntype + ' __stdcall ' + funcname + 'Wrapper(' + arglist + ')' print '{' stringname = funcname @@ -287,11 +289,15 @@ for w in sorted(wrappers.keys()) : if returntype.lower() == 'void' : print ' RESOLVE(' + pfntypename + ', "' + stringname + '");' + print '#ifdef _DEBUG' print ' if (glxWinDebugSettings.enable' + prefix.upper() + 'callTrace) ErrorF("'+ funcname + '\\n");' + print '#endif' print ' RESOLVED_PROC(' + pfntypename + ')(', else : print ' RESOLVE_RET(' + pfntypename + ', "' + stringname + '", FALSE);' + print '#ifdef _DEBUG' print ' if (glxWinDebugSettings.enable' + prefix.upper() + 'callTrace) ErrorF("'+ funcname + '\\n");' + print '#endif' print ' return RESOLVED_PROC(' + pfntypename + ')(', if arglist != 'void' : @@ -314,6 +320,6 @@ if dispatchheader : if wrappers.has_key(d) : print ' SET_'+ d + '(disp, (void *)' + prefix + d + 'Wrapper);' else : - print '#warning No wrapper for ' + prefix + d + ' !' + print '#pragma message("No wrapper for ' + prefix + d + ' !")' print '}' |