This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
silence g++ warning with PL_magic_vtable_names
authorDavid Mitchell <davem@iabyn.com>
Tue, 18 Dec 2012 23:09:46 +0000 (23:09 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 18 Dec 2012 23:47:39 +0000 (23:47 +0000)
See this p5p thread for more details

    <20121218144018.GQ1842@iabyn.com>

mg_vtable.h
regen/mg_vtable.pl

index 316c555..f391713 100644 (file)
@@ -91,7 +91,7 @@ enum {                /* pass one of these to get_vtbl */
 };
 
 #ifdef DOINIT
-EXTCONST char *PL_magic_vtable_names[magic_vtable_max] = {
+EXTCONST char * const PL_magic_vtable_names[magic_vtable_max] = {
     "arylen",
     "arylen_p",
     "backref",
@@ -123,7 +123,7 @@ EXTCONST char *PL_magic_vtable_names[magic_vtable_max] = {
     "vec"
 };
 #else
-EXTCONST char *PL_magic_vtable_names[magic_vtable_max];
+EXTCONST char * const PL_magic_vtable_names[magic_vtable_max];
 #endif
 
 /* These all need to be 0, not NULL, as NULL can be (void*)0, which is a
index e095614..d8217a8 100644 (file)
@@ -278,11 +278,11 @@ enum {            /* pass one of these to get_vtbl */
 };
 
 #ifdef DOINIT
-EXTCONST char *PL_magic_vtable_names[magic_vtable_max] = {
+EXTCONST char * const PL_magic_vtable_names[magic_vtable_max] = {
     "$names"
 };
 #else
-EXTCONST char *PL_magic_vtable_names[magic_vtable_max];
+EXTCONST char * const PL_magic_vtable_names[magic_vtable_max];
 #endif
 
 EOH