[Mesa-dev] [PATCH] vbo: replace __FUNCTION__ with __func__

Anuj Phogat anuj.phogat at gmail.com
Fri Apr 3 10:54:22 PDT 2015


On Fri, Apr 3, 2015 at 5:02 AM, Marius Predut <marius.predut at intel.com> wrote:
> Consistently just use C99's __func__ everywhere.
> The patch was verified with Microsoft Visual studio 2013
> redistributable package(RTM version number: 18.0.21005.1)
> Next MSVC versions intends to support __func__.
> No functional changes.
>
> Signed-off-by: Marius Predut <marius.predut at intel.com>
> ---
>  src/mesa/vbo/vbo_exec_api.c  |    2 +-
>  src/mesa/vbo/vbo_exec_draw.c |    4 ++--
>  src/mesa/vbo/vbo_rebase.c    |    2 +-
>  src/mesa/vbo/vbo_save_api.c  |    2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
> index 02741c2..859078f 100644
> --- a/src/mesa/vbo/vbo_exec_api.c
> +++ b/src/mesa/vbo/vbo_exec_api.c
> @@ -439,7 +439,7 @@ do {                                                                        \
>  } while (0)
>
>
> -#define ERROR(err) _mesa_error( ctx, err, __FUNCTION__ )
> +#define ERROR(err) _mesa_error( ctx, err, __func__ )
>  #define TAG(x) vbo_##x
>
>  #include "vbo_attrib_tmp.h"
> diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
> index 91f2ca4..37b53a8 100644
> --- a/src/mesa/vbo/vbo_exec_draw.c
> +++ b/src/mesa/vbo/vbo_exec_draw.c
> @@ -45,7 +45,7 @@ vbo_exec_debug_verts( struct vbo_exec_context *exec )
>     GLuint i;
>
>     printf("%s: %u vertices %d primitives, %d vertsize\n",
> -         __FUNCTION__,
> +         __func__,
>           count,
>           exec->vtx.prim_count,
>           exec->vtx.vertex_size);
> @@ -402,7 +402,7 @@ vbo_exec_vtx_flush(struct vbo_exec_context *exec, GLboolean keepUnmapped)
>           }
>
>           if (0)
> -            printf("%s %d %d\n", __FUNCTION__, exec->vtx.prim_count,
> +            printf("%s %d %d\n", __func__, exec->vtx.prim_count,
>                    exec->vtx.vert_count);
>
>          vbo_context(ctx)->draw_prims( ctx,
> diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/vbo/vbo_rebase.c
> index b06df4a..c3c4b64 100644
> --- a/src/mesa/vbo/vbo_rebase.c
> +++ b/src/mesa/vbo/vbo_rebase.c
> @@ -142,7 +142,7 @@ void vbo_rebase_prims( struct gl_context *ctx,
>     assert(min_index != 0);
>
>     if (0)
> -      printf("%s %d..%d\n", __FUNCTION__, min_index, max_index);
> +      printf("%s %d..%d\n", __func__, min_index, max_index);
>
>
>     /* XXX this path is disabled for now.
> diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
> index fd9a5de..5927bee 100644
> --- a/src/mesa/vbo/vbo_save_api.c
> +++ b/src/mesa/vbo/vbo_save_api.c
> @@ -763,7 +763,7 @@ _save_reset_vertex(struct gl_context *ctx)
>
>
>
> -#define ERROR(err)   _mesa_compile_error(ctx, err, __FUNCTION__);
> +#define ERROR(err)   _mesa_compile_error(ctx, err, __func__);
>
>
>  /* Only one size for each attribute may be active at once.  Eg. if
> --
> 1.7.9.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Both patches are:
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the mesa-dev mailing list