Don't promulgate Perl attributes
[p5sagit/p5-mst-13.2.git] / xsutils.c
index 94d7652..82df4f8 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);
 }
 
@@ -85,8 +85,8 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs)
 #endif
            case 6:
                switch (name[3]) {
-               case 'l':
 #ifdef CVf_LVALUE
+               case 'l':
                    if (memEQ(name, "lvalue", 6)) {
                        if (negated)
                            CvFLAGS((CV*)sv) &= ~CVf_LVALUE;
@@ -95,8 +95,8 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs)
                        continue;
                    }
                    break;
+#endif
                case 'k':
-#endif /* defined CVf_LVALUE */
                    if (memEQ(name, "locked", 6)) {
                        if (negated)
                            CvFLAGS((CV*)sv) &= ~CVf_LOCKED;
@@ -162,7 +162,6 @@ XS(XS_attributes_bootstrap)
 {
     dVAR;
     dXSARGS;
-    const char file[] = __FILE__;
 
     if( items > 1 )
         Perl_croak(aTHX_ "Usage: attributes::bootstrap $module");