This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
update PL_stack_sp when we exit matcher_matches_sv()
authorTony Cook <tony@develop-help.com>
Thu, 19 Feb 2015 04:03:58 +0000 (15:03 +1100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 19 Mar 2015 14:51:52 +0000 (14:51 +0000)
pp_ctl.c
t/op/smartmatch.t

index f7cb216..23094e8 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -4507,6 +4507,7 @@ STATIC bool
 S_matcher_matches_sv(pTHX_ PMOP *matcher, SV *sv)
 {
     dSP;
+    bool result;
 
     PERL_ARGS_ASSERT_MATCHER_MATCHES_SV;
     
@@ -4515,7 +4516,10 @@ S_matcher_matches_sv(pTHX_ PMOP *matcher, SV *sv)
     PUTBACK;
     (void) Perl_pp_match(aTHX);
     SPAGAIN;
-    return (SvTRUEx(POPs));
+    result = SvTRUEx(POPs);
+    PUTBACK;
+
+    return result;
 }
 
 STATIC void
index f51884d..9db2069 100644 (file)
@@ -136,7 +136,6 @@ sub NOT_DEF() { undef }
 {
   # [perl #123860]
   # this can but might not crash
-  local $::TODO = "not yet fixed...";
   # This can but might not crash
   #
   # The second smartmatch would leave a &PL_sv_no on the stack for