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.
authorNicholas Clark <nick@ccl4.org>
Sun, 7 Nov 2010 22:00:20 +0000 (22:00 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 8 Nov 2010 07:55:10 +0000 (07:55 +0000)
On this platform, this reduces the object size by about .5K, for an unthreaded
build.

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