[Mesa-dev] [PATCH 6/7] glx: use GLX_ALIAS for glXGetProcAddress

Ian Romanick idr at freedesktop.org
Mon Dec 5 19:59:14 UTC 2016


On 12/05/2016 11:52 AM, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> Use the macro, rather than open-coding it.
> 
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>  src/glx/glxcmds.c | 17 ++++-------------
>  1 file changed, 4 insertions(+), 13 deletions(-)
> 
> diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
> index 7266b58..6c7bbfd 100644
> --- a/src/glx/glxcmds.c
> +++ b/src/glx/glxcmds.c
> @@ -2663,19 +2663,10 @@ _GLX_PUBLIC void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
>   *
>   * \sa glXGetProcAddressARB
>   */
> -_GLX_PUBLIC void (*glXGetProcAddress(const GLubyte * procName)) (void)
> -# ifdef HAVE_FUNC_ATTRIBUTE_ALIAS
> -# if defined(USE_MGL_NAMESPACE)
> -   __attribute__ ((alias("mglXGetProcAddressARB")));
> -# else
> -   __attribute__ ((alias("glXGetProcAddressARB")));
> -# endif
> -#else
> -{
> -   return glXGetProcAddressARB(procName);
> -}
> -#endif /* HAVE_FUNC_ATTRIBUTE_ALIA */
> -
> +_GLX_PUBLIC
> +GLX_ALIAS(__GLXextFuncPtr, glXGetProcAddress,
> +          (const GLubyte * procName),
> +          (procName), glXGetProcAddressARB)

Does this still work correctly with USE_MGL_NAMESPACE?

>  
>  #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
>  /**
> 



More information about the mesa-dev mailing list