From 88ecb8a6b9eca675d383c8a0292e9706cb2870d1 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 20 Mar 2011 10:03:15 +0000 Subject: In B, use typeglob aliasing instead of subref to typeglob assignment. Typeglob aliasing saves just about 1.25K, because fewer internal structures are created. In the general case the behaviour of the two differs, but as the only package variables of these names are subroutines, and we are within our own namespace, there is no difference here. --- ext/B/B.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext') diff --git a/ext/B/B.pm b/ext/B/B.pm index 91dc5f59b0..d98793ccfa 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -15,7 +15,7 @@ require Exporter; # walkoptree comes from B.xs BEGIN { - $B::VERSION = '1.28'; + $B::VERSION = '1.29'; @B::EXPORT_OK = qw(minus_c ppname save_BEGINs class peekop cast_I32 cstring cchar hash threadsv_names @@ -105,15 +105,15 @@ sub B::IV::int_value { } sub B::NULL::as_string() {""} -*B::IV::as_string = \&B::IV::int_value; -*B::PV::as_string = \&B::PV::PV; +*B::IV::as_string = \*B::IV::int_value; +*B::PV::as_string = \*B::PV::PV; # The input typemap checking makes no distinction between different SV types, # so the XS body will generate the same C code, despite the different XS # "types". So there is no change in behaviour from doing "newXS" like this, # compared with the old approach of having a (near) duplicate XS body. # We should fix the typemap checking. -*B::IV::RV = \&B::PV::RV if $] > 5.012; +*B::IV::RV = \*B::PV::RV if $] > 5.012; my $debug; my $op_count = 0; -- cgit v1.2.1