summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-20 10:03:15 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-20 10:03:15 +0000
commit88ecb8a6b9eca675d383c8a0292e9706cb2870d1 (patch)
tree5dafb9ac71c0930532ee1e2351ce796dd77af9b4 /ext
parent658a9f31e43dcb2b52fd873b87444968c94594fa (diff)
downloadperl-88ecb8a6b9eca675d383c8a0292e9706cb2870d1.tar.gz
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.
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B.pm8
1 files changed, 4 insertions, 4 deletions
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;