*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 400329f5f102d64f0a3628fb5ccc719203d82e17..ac1c5aaf45b3e9b625c6f297bd8ffcfdaff8dd0a 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 94d765243cd620a615ccb29fc6ccf7ab2535d8c5..86fb0aae6ac4efab7141b1128b8784144180c36b 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");