This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Compress-Raw-Zlib to CPAN version 2.047
[perl5.git] / pp.h
diff --git a/pp.h b/pp.h
index 23636cc..63b2234 100644 (file)
--- a/pp.h
+++ b/pp.h
@@ -345,15 +345,7 @@ Does not use C<TARG>.  See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
 #define dPOPXiirl(X)   IV right = POPi; IV left = CAT2(X,i)
 
 #define USE_LEFT(sv) \
-       (SvOK(sv) || SvGMAGICAL(sv) || !(PL_op->op_flags & OPf_STACKED))
-#define dPOPXnnrl_ul(X)        \
-    NV right = POPn;                           \
-    SV *leftsv = CAT2(X,s);                            \
-    NV left = USE_LEFT(leftsv) ? SvNV(leftsv) : 0.0
-#define dPOPXiirl_ul(X) \
-    IV right = POPi;                                   \
-    SV *leftsv = CAT2(X,s);                            \
-    IV left = USE_LEFT(leftsv) ? SvIV(leftsv) : 0
+       (SvOK(sv) || !(PL_op->op_flags & OPf_STACKED))
 #define dPOPXiirl_ul_nomg(X) \
     IV right = (sp--, SvIV_nomg(TOPp1s));              \
     SV *leftsv = CAT2(X,s);                            \
@@ -361,17 +353,13 @@ Does not use C<TARG>.  See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
 
 #define dPOPPOPssrl    dPOPXssrl(POP)
 #define dPOPPOPnnrl    dPOPXnnrl(POP)
-#define dPOPPOPnnrl_ul dPOPXnnrl_ul(POP)
 #define dPOPPOPiirl    dPOPXiirl(POP)
-#define dPOPPOPiirl_ul dPOPXiirl_ul(POP)
 
 #define dPOPTOPssrl    dPOPXssrl(TOP)
 #define dPOPTOPnnrl    dPOPXnnrl(TOP)
-#define dPOPTOPnnrl_ul dPOPXnnrl_ul(TOP)
 #define dPOPTOPnnrl_nomg \
     NV right = SvNV_nomg(TOPs); NV left = (sp--, SvNV_nomg(TOPs))
 #define dPOPTOPiirl    dPOPXiirl(TOP)
-#define dPOPTOPiirl_ul dPOPXiirl_ul(TOP)
 #define dPOPTOPiirl_ul_nomg dPOPXiirl_ul_nomg(TOP)
 #define dPOPTOPiirl_nomg \
     IV right = SvIV_nomg(TOPs); IV left = (sp--, SvIV_nomg(TOPs))
@@ -505,9 +493,9 @@ True if this op will be the return value of an lvalue subroutine
 #  define TIED_METHOD_SAY                      0x10
 
 /* Used in various places that need to dereference a glob or globref */
-#  define MAYBE_DEREF_GV(sv)                                       \
+#  define MAYBE_DEREF_GV_flags(sv,phlags)                          \
     (                                                               \
-       SvGETMAGIC(sv),                                              \
+       (void)(phlags & SV_GMAGIC && (SvGETMAGIC(sv),0)),            \
        isGV_with_GP(sv)                                              \
          ? (GV *)sv                                                   \
          : SvROK(sv) && SvTYPE(SvRV(sv)) <= SVt_PVLV &&               \
@@ -515,6 +503,8 @@ True if this op will be the return value of an lvalue subroutine
             ? (GV *)SvRV(sv)                                            \
             : NULL                                                       \
     )
+#  define MAYBE_DEREF_GV(sv)      MAYBE_DEREF_GV_flags(sv,SV_GMAGIC)
+#  define MAYBE_DEREF_GV_nomg(sv) MAYBE_DEREF_GV_flags(sv,0)
 
 #endif