From: Marcus Holland-Moritz Date: Fri, 24 Oct 2008 21:38:48 +0000 (+0000) Subject: Make C++ compilers happy #1: "typename" is a C++ keyword. X-Git-Tag: accepted/trunk/20130322.191538~12674 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bef8a12803580c2fb97a03ebe6e7df3e52cd10bf;p=platform%2Fupstream%2Fperl.git Make C++ compilers happy #1: "typename" is a C++ keyword. p4raw-id: //depot/perl@34574 --- diff --git a/embed.fnc b/embed.fnc index d7a0ddb..d9b5f22 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1680,7 +1680,7 @@ s |bool |vdie_common |NULLOK const char *message|STRLEN msglen\ sr |char * |write_no_mem #if defined(PERL_MEM_LOG) && defined(PERL_MEM_LOG_STDERR) sn |void |mem_log_common |enum mem_log_type mlt|const UV n|const UV typesize \ - |NN const char *typename|NULLOK const SV *sv \ + |NN const char *type_name|NULLOK const SV *sv \ |Malloc_t oldalloc|Malloc_t newalloc \ |NN const char *filename|const int linenumber \ |NN const char *funcname diff --git a/handy.h b/handy.h index 39e3ef8..25988b5 100644 --- a/handy.h +++ b/handy.h @@ -762,9 +762,9 @@ PoisonWith(0xEF) for catching access to freed memory. * any News() happening...? */ -Malloc_t Perl_mem_log_alloc(const UV n, const UV typesize, const char *typename, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname); +Malloc_t Perl_mem_log_alloc(const UV n, const UV typesize, const char *type_name, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname); -Malloc_t Perl_mem_log_realloc(const UV n, const UV typesize, const char *typename, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname); +Malloc_t Perl_mem_log_realloc(const UV n, const UV typesize, const char *type_name, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname); Malloc_t Perl_mem_log_free(Malloc_t oldalloc, const char *filename, const int linenumber, const char *funcname); diff --git a/proto.h b/proto.h index 29d1b81..3ad89f2 100644 --- a/proto.h +++ b/proto.h @@ -5888,12 +5888,12 @@ STATIC char * S_write_no_mem(pTHX) __attribute__noreturn__; #if defined(PERL_MEM_LOG) && defined(PERL_MEM_LOG_STDERR) -STATIC void S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesize, const char *typename, const SV *sv, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname) +STATIC void S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesize, const char *type_name, const SV *sv, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname) __attribute__nonnull__(4) __attribute__nonnull__(8) __attribute__nonnull__(10); #define PERL_ARGS_ASSERT_MEM_LOG_COMMON \ - assert(typename); assert(filename); assert(funcname) + assert(type_name); assert(filename); assert(funcname) #endif #endif diff --git a/util.c b/util.c index 6d4e3af..7efbbd4 100644 --- a/util.c +++ b/util.c @@ -5557,7 +5557,7 @@ Perl_free_global_struct(pTHX_ struct perl_vars *plvarsp) # endif static void -S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesize, const char *typename, const SV *sv, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname) +S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesize, const char *type_name, const SV *sv, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname) { # if defined(PERL_MEM_LOG_ENV) || defined(PERL_MEM_LOG_ENV_FD) const char *s; @@ -5613,14 +5613,14 @@ S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesize, const cha "alloc: %s:%d:%s: %"IVdf" %"UVuf " %s = %"IVdf": %"UVxf"\n", filename, linenumber, funcname, n, typesize, - typename, n * typesize, PTR2UV(newalloc)); + type_name, n * typesize, PTR2UV(newalloc)); break; case MLT_REALLOC: len = my_snprintf(buf, sizeof(buf), "realloc: %s:%d:%s: %"IVdf" %"UVuf " %s = %"IVdf": %"UVxf" -> %"UVxf"\n", filename, linenumber, funcname, n, typesize, - typename, n * typesize, PTR2UV(oldalloc), + type_name, n * typesize, PTR2UV(oldalloc), PTR2UV(newalloc)); break; case MLT_FREE: @@ -5645,19 +5645,19 @@ S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesize, const cha #endif Malloc_t -Perl_mem_log_alloc(const UV n, const UV typesize, const char *typename, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname) +Perl_mem_log_alloc(const UV n, const UV typesize, const char *type_name, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname) { #ifdef PERL_MEM_LOG_STDERR - mem_log_common(MLT_ALLOC, n, typesize, typename, NULL, NULL, newalloc, filename, linenumber, funcname); + mem_log_common(MLT_ALLOC, n, typesize, type_name, NULL, NULL, newalloc, filename, linenumber, funcname); #endif return newalloc; } Malloc_t -Perl_mem_log_realloc(const UV n, const UV typesize, const char *typename, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname) +Perl_mem_log_realloc(const UV n, const UV typesize, const char *type_name, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname) { #ifdef PERL_MEM_LOG_STDERR - mem_log_common(MLT_REALLOC, n, typesize, typename, NULL, oldalloc, newalloc, filename, linenumber, funcname); + mem_log_common(MLT_REALLOC, n, typesize, type_name, NULL, oldalloc, newalloc, filename, linenumber, funcname); #endif return newalloc; }