[Mesa-dev] [PATCH] util: Rename PURE to ATTRIBUTE_PURE.

Brian Paul brianp at vmware.com
Fri Aug 7 06:52:29 PDT 2015


On 08/07/2015 06:10 AM, Jose Fonseca wrote:
> To avoid collission with windows.h's PURE macro.
>
> We could consider eventually renaming to __pure, but that would require
> further care, so it's left to the future.
> ---
>   src/util/macros.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/util/macros.h b/src/util/macros.h
> index 5c5c92e..84e4f18 100644
> --- a/src/util/macros.h
> +++ b/src/util/macros.h
> @@ -145,9 +145,9 @@ do {                       \
>    * return value.  As a result, calls to it can be dead code eliminated.
>    */
>   #ifdef HAVE_FUNC_ATTRIBUTE_PURE
> -#define PURE __attribute__((__pure__))
> +#define ATTRIBUTE_PURE __attribute__((__pure__))
>   #else
> -#define PURE
> +#define ATTRIBUTE_PURE
>   #endif
>
>   #ifdef __cplusplus
>

Looks OK to me.  AFAICT, we're not using the macro anywhere yet.

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list