diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-08 09:31:39 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-08 09:31:39 +0000 |
commit | 0a49bb245ba47522d06cd04cb0bb92cb03d49ee9 (patch) | |
tree | 00fb1ebc633a5eb0714d80ceca005f913af2eac9 /ext/B/B.xs | |
parent | d2b4c688cb5f38457c0fdf47af09359204b0926e (diff) | |
download | perl-0a49bb245ba47522d06cd04cb0bb92cb03d49ee9.tar.gz |
Merge the implementation of B::COP::{io,warnings} using ALIAS.
On this platform, this reduces the object size by about .5K.
Diffstat (limited to 'ext/B/B.xs')
-rw-r--r-- | ext/B/B.xs | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs index cfc05178f8..06d89b1e61 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -1275,22 +1275,13 @@ COP_arybase(o) void COP_warnings(o) B::COP o - PPCODE: -#if PERL_VERSION >= 9 - ST(0) = make_warnings_object(aTHX_ o); -#else - ST(0) = make_sv_object(aTHX_ NULL, o->cop_warnings); -#endif - XSRETURN(1); - -void -COP_io(o) - B::COP o - PPCODE: + ALIAS: + io = 1 + PPCODE: #if PERL_VERSION >= 9 - ST(0) = make_cop_io_object(aTHX_ o); + ST(0) = ix ? make_cop_io_object(aTHX_ o) : make_warnings_object(aTHX_ o); #else - ST(0) = make_sv_object(aTHX_ NULL, o->cop_io); + ST(0) = make_sv_object(aTHX_ NULL, ix ? o->cop_io : o->cop_warnings); #endif XSRETURN(1); |