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 16c617955b5a6b5a54c10b2f312abc23b2fee8a4..d8d2b435d76d4a30f7b8ee6830e8ec2374923a06 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)