This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge the implementation of B::COP::{file,stashpv} using ALIAS.
[perl5.git] / ext / B / B.xs
index 9dd6d06..6f9f9c8 100644 (file)
@@ -1254,16 +1254,16 @@ COP_filegv(o)
        B::COP  o
 
 #else
-#define COP_stashpv(o) CopSTASHPV(o)
-#define COP_file(o)    CopFILE(o)
 
 char *
 COP_stashpv(o)
        B::COP  o
-
-char *
-COP_file(o)
-       B::COP  o
+    ALIAS:
+       file = 1
+    CODE:
+       RETVAL = ix ? CopFILE(o) : CopSTASHPV(o);
+    OUTPUT:
+       RETVAL
 
 #endif