This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge the implementation of B::{minus_c,save_BEGINSs} using ALIAS.
authorNicholas Clark <nick@ccl4.org>
Sun, 31 Oct 2010 09:52:40 +0000 (09:52 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 31 Oct 2010 09:52:40 +0000 (09:52 +0000)
ext/B/B.xs

index 16c6179..d8d2b43 100644 (file)
@@ -795,13 +795,13 @@ cast_I32(i)
 
 void
 minus_c()
+    ALIAS:
+       save_BEGINs = 1
     CODE:
-       PL_minus_c = TRUE;
-
-void
-save_BEGINs()
-    CODE:
-       PL_savebegin = TRUE;
+       if (ix)
+           PL_savebegin = TRUE;
+       else
+           PL_minus_c = TRUE;
 
 SV *
 cstring(sv)