This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Implement SvIV_nomg(), SvUV_nomg(), SvNV_nomg() and SvTRUE_nomg()
authorPali <pali@cpan.org>
Fri, 12 Jul 2019 11:37:06 +0000 (13:37 +0200)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:39:28 +0000 (16:39 -0600)
commitf626215a34fc17a76b5019ae7e6cbf846db37114
treed7a5399356596c72e3e0e0cd721917a7015e5a82
parent1f8708ac455981a5b3987fde01414d3db544a363
Implement SvIV_nomg(), SvUV_nomg(), SvNV_nomg() and SvTRUE_nomg()

Use sv_mortalcopy_flags() macro with SV_NOSTEAL flag to create non-magical
copy of input scalar. And on this non-magical copy call original Perl's
SvIV/SvUV/SvNV/SvTRUE macro.

This would ensure that get magic is not processed on original input scalar
argument and also that correct value is returned.

(cherry picked from commit c01919df38e1d016f008b3572c81a86f70e53be5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/inc/magic
dist/Devel-PPPort/parts/todo/5013002
dist/Devel-PPPort/parts/todo/5013006
dist/Devel-PPPort/t/magic.t