[Mesa-dev] [PATCH 1/2] mesa: add DECL_GLAPIENTRY macro

Brian Paul brian.e.paul at gmail.com
Wed Jun 7 15:22:21 UTC 2017


On Wed, Jun 7, 2017 at 7:29 AM, Samuel Pitoiset <samuel.pitoiset at gmail.com>
wrote:

> To declare both errors and no errors GL prototypes.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/mesa/main/glheader.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
> index 3f2a923782..eeee1976ed 100644
> --- a/src/mesa/main/glheader.h
> +++ b/src/mesa/main/glheader.h
> @@ -182,6 +182,9 @@ typedef void *GLeglImageOES;
>
>  #define GLX_DONT_CARE                                           0xFFFFFFFF
>
> +#define DECL_GLAPIENTRY(ret, name, ...) \
> +   ret GLAPIENTRY _mesa_##name##_no_error(__VA_ARGS__); \
> +   ret GLAPIENTRY _mesa_##name(__VA_ARGS__);
>
>
I'm not sure I like this.  It saves you (future) typing, but it obfuscates
the declarations.  The first thing most people would do upon seeing
DECL_GLAPIENTRY would be to search for the definition to figure out what it
does.

Can you leave it as-is?

-Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170607/600c2cf6/attachment.html>


More information about the mesa-dev mailing list