In perl.git, the branch smoke-me/uts_Glue-Factory has been created
<http://perl5.git.perl.org/perl.git/commitdiff/be8851fc38b39ec6167336f4fee669536e99e022?hp=0000000000000000000000000000000000000000>
at be8851fc38b39ec6167336f4fee669536e99e022 (commit)
- Log -----------------------------------------------------------------
commit be8851fc38b39ec6167336f4fee669536e99e022
Author: Nicholas Clark <[email protected]>
Date: Mon Aug 13 16:11:35 2012 +0200
Document that newCONSTSUB{,_flags} takes ownership of a reference to the SV.
Also note the collusion between op_const_cv() and cv_clone(), whereby the
former returns a fresh copy of the SV to the latter, which is then
immediately
passed to newCONSTSUB.
M op.c
M pad.c
commit 0fc4714aa17fcb440e297d8a2798e956eed9ca21
Author: Nicholas Clark <[email protected]>
Date: Mon Aug 13 15:11:41 2012 +0200
XS::APItest::newCONSTSUB was not handling SV reference counts correctly.
newCONSTSUB() and newCONSTSUB_flags() take ownership of (one reference to)
the passed-in SV. As the XS wrapper is passing in a SV taken from the stack,
it needs to up the reference count by one in order to avoid later bugs.
M ext/XS-APItest/APItest.xs
M ext/XS-APItest/t/newCONSTSUB.t
commit c0810f8ef849bf940e296c00ef5a0c1bd77f9c62
Author: Nicholas Clark <[email protected]>
Date: Mon Aug 13 13:38:03 2012 +0200
Use ALIAS to provide XS::APItest::newCONSTSUB and newCONSTSUB_flags
Previously both C routines were wrapped with newCONSTSUB_type, which used a
"type" parameter to determine which C code to call. Use an ALIAS to bind the
code to two names, and eliminate the "type" parameter.
This makes the test code clearer. It's not perfect, as the XS wrapper
XS::APItest::newCONSTSUB has a flags parameter whereas the underlying C code
does not, but fixing this would require considerably more XS hackery.
M ext/XS-APItest/APItest.pm
M ext/XS-APItest/APItest.xs
M ext/XS-APItest/t/newCONSTSUB.t
-----------------------------------------------------------------------
--
Perl5 Master Repository