[Jifty-commit] r5655 - B-OPCheck

Jifty commits jifty-commit at lists.jifty.org
Sun Aug 3 20:52:30 EDT 2008


Author: nothingmuch
Date: Sun Aug  3 20:52:29 2008
New Revision: 5655

Modified:
   B-OPCheck/OPCheck.xs

Log:
don't call hook if op is an entersub for an unimport

Modified: B-OPCheck/OPCheck.xs
==============================================================================
--- B-OPCheck/OPCheck.xs	(original)
+++ B-OPCheck/OPCheck.xs	Sun Aug  3 20:52:29 2008
@@ -100,7 +100,15 @@
      * work around a %^H scoping bug by checking that PL_hints (which is properly scoped) & an unused
      * PL_hints bit (0x100000) is true
      */
-     I32 opnum = o->op_type;
+    I32 opnum = o->op_type;
+    if ( opnum == OP_ENTERSUB ) {
+       SVOP *method_named = ((LISTOP *)o)->op_last;
+       if ( method_named->op_type == OP_METHOD_NAMED ) {
+           if ( strEQ(SvPV_nolen(method_named->op_sv), "unimport") ) {
+               return PL_check_orig[OP_ENTERSUB](aTHX_ o);
+            }
+        }
+    }
     if ((PL_hints & 0x120000) == 0x120000) {
        AV *subs = OPCHECK_subs[opnum];
        if (subs) {
@@ -117,7 +125,7 @@
         }
     }
 
-    return PL_check_orig[o->op_type](aTHX_ o);
+    return PL_check_orig[opnum](aTHX_ o);
 }
 
 /* ============================================


More information about the Jifty-commit mailing list