This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use the same XS body for B::IV::RV and B::PV::RV.
authorNicholas Clark <nick@ccl4.org>
Fri, 29 Oct 2010 10:29:38 +0000 (11:29 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 29 Oct 2010 10:29:38 +0000 (11:29 +0100)
commitf046b1bd16d7e477a3870c66325be94702e16b18
treeb691707ebb7fbfd64703e787e4e8b507cbee689a
parent9efba5c8ba482f48d0d42ef3b332f7217f2b0e1e
Use the same XS body for B::IV::RV and B::PV::RV.

This reduces the object code size by about 600 bytes on this platform.

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.
ext/B/B.xs
ext/B/t/b.t