This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
*static* pointers to newXSUB(), dammit!
authorNicholas Clark <nick@ccl4.org>
Tue, 2 May 2006 17:46:38 +0000 (17:46 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 2 May 2006 17:46:38 +0000 (17:46 +0000)
p4raw-id: //depot/perl@28066

writemain.SH
xsutils.c

index 400329f..ac1c5aa 100644 (file)
@@ -77,7 +77,7 @@ xs_init(pTHX)
 EOP
 
 if test X"$args" != "X" ; then
-    echo "    const char file[] = __FILE__;"
+    echo "    static const char file[] = __FILE__;"
     echo "    dXSUB_SYS;"
 
     ai=''
index 94d7652..86fb0aa 100644 (file)
--- a/xsutils.c
+++ b/xsutils.c
@@ -43,11 +43,11 @@ PERL_XS_EXPORT_C void XS_attributes_bootstrap(pTHX_ CV *cv);
  * version checks in these bootstrap calls are optional.
  */
 
+static const char file[] = __FILE__;
+
 void
 Perl_boot_core_xsutils(pTHX)
 {
-    const char file[] = __FILE__;
-
     newXS("attributes::bootstrap",     XS_attributes_bootstrap,        file);
 }
 
@@ -162,7 +162,6 @@ XS(XS_attributes_bootstrap)
 {
     dVAR;
     dXSARGS;
-    const char file[] = __FILE__;
 
     if( items > 1 )
         Perl_croak(aTHX_ "Usage: attributes::bootstrap $module");