Change 30039 by [EMAIL PROTECTED] on 2007/01/27 18:27:17

        Integrate:
        [ 28753]
        Subject: [PATCH] Don't promulgate Perl attributes
        From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
        Date: Wed, 23 Aug 2006 10:07:05 -0700
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28756]
        Subject: [PATCH] RE: [perl #40227] 'reserved' warning not working
        From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
        Date: Thu, 24 Aug 2006 09:04:12 -0700
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/maint-5.8/perl/lib/attributes.pm#5 integrate
... //depot/maint-5.8/perl/xsutils.c#25 integrate

Differences ...

==== //depot/maint-5.8/perl/lib/attributes.pm#5 (text) ====
Index: perl/lib/attributes.pm
--- perl/lib/attributes.pm#4~21359~     2003-09-24 07:03:52.000000000 -0700
+++ perl/lib/attributes.pm      2007-01-27 10:27:17.000000000 -0800
@@ -1,6 +1,6 @@
 package attributes;
 
-our $VERSION = 0.06;
+our $VERSION = 0.08;
 
 @EXPORT_OK = qw(get reftype);
 @EXPORT = ();
@@ -23,7 +23,6 @@
 #sub _fetch_attrs ($) ;
 #sub _guess_stash ($) ;
 #sub _modify_attrs ;
-#sub _warn_reserved () ;
 #
 # The extra trips through newATTRSUB in the interpreter wipe out any savings
 # from avoiding the BEGIN block.  Just do the bootstrap now.
@@ -43,9 +42,10 @@
     my @badattrs;
     if ($pkgmeth) {
        my @pkgattrs = _modify_attrs($svref, @attrs);
-       @badattrs = $pkgmeth->($home_stash, $svref, @attrs);
+       @badattrs = $pkgmeth->($home_stash, $svref, @pkgattrs);
        if ([EMAIL PROTECTED] && @pkgattrs) {
-           return unless _warn_reserved;
+            require warnings;
+           return unless warnings::enabled('reserved');
            @pkgattrs = grep { m/\A[[:lower:]]+(?:\z|\()/ } @pkgattrs;
            if (@pkgattrs) {
                for my $attr (@pkgattrs) {

==== //depot/maint-5.8/perl/xsutils.c#25 (text) ====
Index: perl/xsutils.c
--- perl/xsutils.c#24~29968~    2007-01-25 02:55:13.000000000 -0800
+++ perl/xsutils.c      2007-01-27 10:27:17.000000000 -0800
@@ -23,7 +23,6 @@
  */
 
 /* package attributes; */
-PERL_XS_EXPORT_C void XS_attributes__warn_reserved(pTHX_ CV *cv);
 PERL_XS_EXPORT_C void XS_attributes_reftype(pTHX_ CV *cv);
 PERL_XS_EXPORT_C void XS_attributes__modify_attrs(pTHX_ CV *cv);
 PERL_XS_EXPORT_C void XS_attributes__guess_stash(pTHX_ CV *cv);
@@ -84,8 +83,8 @@
 #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;
@@ -94,8 +93,8 @@
                        continue;
                    }
                    break;
+#endif
                case 'k':
-#endif /* defined CVf_LVALUE */
                    if (memEQ(name, "locked", 6)) {
                        if (negated)
                            CvFLAGS((CV*)sv) &= ~CVf_LOCKED;
@@ -164,7 +163,6 @@
     if( items > 1 )
         Perl_croak(aTHX_ "Usage: attributes::bootstrap $module");
 
-    newXSproto("attributes::_warn_reserved", XS_attributes__warn_reserved, 
(char *)file, "");
     newXS("attributes::_modify_attrs", XS_attributes__modify_attrs,    (char 
*)file);
     newXSproto("attributes::_guess_stash", XS_attributes__guess_stash, (char 
*)file, "$");
     newXSproto("attributes::_fetch_attrs", XS_attributes__fetch_attrs, (char 
*)file, "$");
@@ -309,21 +307,6 @@
     XSRETURN(1);
 }
 
-XS(XS_attributes__warn_reserved)
-{
-    dXSARGS;
-
-    if (items != 0) {
-       Perl_croak(aTHX_
-                  "Usage: attributes::_warn_reserved ()");
-    }
-
-    EXTEND(SP,1);
-    ST(0) = boolSV(ckWARN(WARN_RESERVED));
-
-    XSRETURN(1);
-}
-
 /*
  * Local variables:
  * c-indentation-style: bsd
End of Patch.

Reply via email to