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

index 4ecf1d9..a98f765 100644 (file)
@@ -2015,15 +2015,17 @@ MODULE = B      PACKAGE = B::HE         PREFIX = He
 B::SV
 HeVAL(he)
        B::HE he
+    ALIAS:
+       SVKEY_force = 1
+    CODE:
+       RETVAL = ix ? HeSVKEY_force(he) : HeVAL(he);
+    OUTPUT:
+       RETVAL
 
 U32
 HeHASH(he)
        B::HE he
 
-B::SV
-HeSVKEY_force(he)
-       B::HE he
-
 MODULE = B     PACKAGE = B::RHE        PREFIX = RHE_
 
 #if PERL_VERSION >= 9