diff options
author | marha <marha@users.sourceforge.net> | 2013-07-01 11:35:04 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-01 11:35:04 +0200 |
commit | 6d46609dfd488f9433d0ed10f49d05e31a6fe51e (patch) | |
tree | b39a9e9ed55707a087244ca676e6654e844a3c61 /xorg-server/hw/xwin/swrastwgl_dri/gen_gl_wrappers.py | |
parent | 3c204c4a20943586532ce477ced827d108f3b4b0 (diff) | |
download | vcxsrv-6d46609dfd488f9433d0ed10f49d05e31a6fe51e.tar.gz vcxsrv-6d46609dfd488f9433d0ed10f49d05e31a6fe51e.tar.bz2 vcxsrv-6d46609dfd488f9433d0ed10f49d05e31a6fe51e.zip |
Synchronised files
Diffstat (limited to 'xorg-server/hw/xwin/swrastwgl_dri/gen_gl_wrappers.py')
-rwxr-xr-x[-rw-r--r--] | xorg-server/hw/xwin/swrastwgl_dri/gen_gl_wrappers.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/swrastwgl_dri/gen_gl_wrappers.py b/xorg-server/hw/xwin/swrastwgl_dri/gen_gl_wrappers.py index cc66eb096..a9cffef78 100644..100755 --- a/xorg-server/hw/xwin/swrastwgl_dri/gen_gl_wrappers.py +++ b/xorg-server/hw/xwin/swrastwgl_dri/gen_gl_wrappers.py @@ -100,6 +100,8 @@ for line in tm : continue l = line.split(',') + if len(l)<4: + continue typemap[l[0]] = l[3].strip() # interestingly, * is not a C type @@ -146,9 +148,8 @@ for line in glspec : arglist_use = m1.group(2) wrappers[function] = {} - # near and far might be reserved words or macros so can't be used as formal parameter names - arglist_use = arglist_use.replace('near','zNear') - arglist_use = arglist_use.replace('far','zFar') + # ensure formal parameter names don't collide with reserved names or shadow global declarations + arglist_use = ',' .join([i.rstrip() + '_' for i in arglist_use.split(",")]) wrappers[function]['arglist_use'] = arglist_use param_count = 0 @@ -217,9 +218,8 @@ for w in sorted(wrappers.keys()) : if k.startswith('param') : l = wrappers[w][k].split() - # near and far might be reserved words or macros so can't be used as formal parameter names - l[0] = l[0].replace('near','zNear') - l[0] = l[0].replace('far','zFar') + # ensure formal parameter names don't collide with reserved names or shadow global declarations + l[0] = l[0] + '_' if l[2] == 'in' : if l[3] == 'array' : |