This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix cv-to-gv assignment to use CvPROTO
authorFather Chrysostomos <sprout@cpan.org>
Mon, 10 Oct 2011 21:36:53 +0000 (14:36 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 10 Oct 2011 21:36:53 +0000 (14:36 -0700)
commit3d5f9785414ca07aa0b024b2a10c2c0e518cc58d
tree0db19529370b684eedac2ab4676b4338c91468da
parent05b525f42a20fe4094336e751e3a99a866e0f97e
Fix cv-to-gv assignment to use CvPROTO

The SvPVX field of a XS AUTOLOAD sub can contain both the prototype
and the name of an AUTOLOADed sub.  The CvPROTO macro knows where in
the buffer to find the prototype.  All code that reads the prototype
should use it.  When I introduced it with commit 8fa6a4095, one code
path was missed: *regular_prototyped_sub = \&prototyped_XS_AUTOLOAD
was using the sub name of the rhs, instead of the prototype, in the
prototype check.
ext/XS-APItest/t/autoload.t
sv.c