[Mesa-dev] [PATCH 2/2] glapi/glx: rename 'table' variable to 'disp_table'

2012-09-06 Thread Brian Paul
From: Brian Paul 

This fixes an issue where the local 'table' variable was hiding the
function parameter name in glGetColorTable(..., void *table).

This should be OK as long as there's never a GL entrypoint that uses
'disp_table' as a parameter name.

Note: This is a candidate for the 9.0 branch.
---
 src/mapi/glapi/gen/glX_proto_send.py |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mapi/glapi/gen/glX_proto_send.py 
b/src/mapi/glapi/gen/glX_proto_send.py
index d42f661..34aa2c3 100644
--- a/src/mapi/glapi/gen/glX_proto_send.py
+++ b/src/mapi/glapi/gen/glX_proto_send.py
@@ -423,9 +423,9 @@ __indirect_get_proc_address(const char *name)
print ''
print '#if defined(GLX_DIRECT_RENDERING) && 
!defined(GLX_USE_APPLEGL)'
print 'if (gc->isDirect) {'
-   print 'const _glapi_proc *const table = 
GET_DISPATCH();'
+   print 'const _glapi_proc *const 
disp_table = GET_DISPATCH();'
print 'PFNGL%sPROC p =' % (name.upper())
-   print '(PFNGL%sPROC) table[%d];' % 
(name.upper(), func.offset)
+   print '(PFNGL%sPROC) 
disp_table[%d];' % (name.upper(), func.offset)
print '%sp(%s);' % (ret_string, 
func.get_called_parameter_string())
print '} else'
print '#endif'
-- 
1.7.4.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] glapi/glx: rename 'table' variable to 'disp_table'

2012-09-06 Thread Jose Fonseca
Both patches look good.

Reviewed-by: Jose Fonseca 

Jose

- Original Message -
> From: Brian Paul 
> 
> This fixes an issue where the local 'table' variable was hiding the
> function parameter name in glGetColorTable(..., void *table).
> 
> This should be OK as long as there's never a GL entrypoint that uses
> 'disp_table' as a parameter name.
> 
> Note: This is a candidate for the 9.0 branch.
> ---
>  src/mapi/glapi/gen/glX_proto_send.py |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mapi/glapi/gen/glX_proto_send.py
> b/src/mapi/glapi/gen/glX_proto_send.py
> index d42f661..34aa2c3 100644
> --- a/src/mapi/glapi/gen/glX_proto_send.py
> +++ b/src/mapi/glapi/gen/glX_proto_send.py
> @@ -423,9 +423,9 @@ __indirect_get_proc_address(const char *name)
>   print ''
>   print '#if defined(GLX_DIRECT_RENDERING) &&
>   !defined(GLX_USE_APPLEGL)'
>   print 'if (gc->isDirect) {'
> - print 'const _glapi_proc *const table = 
> GET_DISPATCH();'
> + print 'const _glapi_proc *const 
> disp_table =
> GET_DISPATCH();'
>   print 'PFNGL%sPROC p =' % (name.upper())
> - print '(PFNGL%sPROC) table[%d];' % 
> (name.upper(),
> func.offset)
> + print '(PFNGL%sPROC) 
> disp_table[%d];' %
> (name.upper(), func.offset)
>   print '%sp(%s);' % (ret_string,
>   func.get_called_parameter_string())
>   print '} else'
>   print '#endif'
> --
> 1.7.4.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev