Change 34574 by [EMAIL PROTECTED] on 2008/10/24 21:38:48
Make C++ compilers happy #1: "typename" is a C++ keyword.
Affected files ...
... //depot/perl/embed.fnc#622 edit
... //depot/perl/handy.h#146 edit
... //depot/perl/proto.h#955 edit
... //depot/perl/util.c#659 edit
Differences ...
==== //depot/perl/embed.fnc#622 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#621~34568~ 2008-10-24 09:35:48.000000000 -0700
+++ perl/embed.fnc 2008-10-24 14:38:48.000000000 -0700
@@ -1680,7 +1680,7 @@
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
==== //depot/perl/handy.h#146 (text) ====
Index: perl/handy.h
--- perl/handy.h#145~34568~ 2008-10-24 09:35:48.000000000 -0700
+++ perl/handy.h 2008-10-24 14:38:48.000000000 -0700
@@ -762,9 +762,9 @@
* 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);
==== //depot/perl/proto.h#955 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#954~34569~ 2008-10-24 09:37:49.000000000 -0700
+++ perl/proto.h 2008-10-24 14:38:48.000000000 -0700
@@ -5888,12 +5888,12 @@
__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
==== //depot/perl/util.c#659 (text) ====
Index: perl/util.c
--- perl/util.c#658~34570~ 2008-10-24 11:33:26.000000000 -0700
+++ perl/util.c 2008-10-24 14:38:48.000000000 -0700
@@ -5557,7 +5557,7 @@
# 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 @@
"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 @@
#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;
}
End of Patch.