This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Copy PADTMPS passed to XSUBs
authorFather Chrysostomos <sprout@cpan.org>
Tue, 13 Aug 2013 20:10:15 +0000 (13:10 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 13 Aug 2013 20:42:41 +0000 (13:42 -0700)
commit3455055faace06645b99a6ed63fce90144ab47e1
tree9350e2e775578481c8b6801d3714d4241e4cf90b
parent4b567c50428833d40192718a32cf4ef48d410d4a
Copy PADTMPS passed to XSUBs

This resolves the last remaining issue in ticket #78194, that
newRV is supposedly buggy because it doesn’t copy its referent.
The full implications of the PADTMP are not explained anywhere in
the API docs, and even XSUBs shouldn’t have to worry about special
handling.  (E.g., what if they do SvREFCNT_dec(SvRV(sv)); SvRV(sv)=...?)

So the real solution here is not to let XSUBs see them.
MANIFEST
ext/XS-APItest/APItest.xs
ext/XS-APItest/t/subcall.t [new file with mode: 0644]
pp_hot.c