Previously OUTPUT argument parameters would replace ST(n) instead of
updating it, this meant that the caller's supplied value would not be
updated.
This change means that OUTPUT T_BOOL arguments called RETVAL won't be
handled correctly, but since the OUTPUT didn't work previously for
*any* case, this is a net improvement.
{
# these attempt to modify a read-only value
- local $TODO = "attempts to modify a read-only value should crash";
ok( !eval { T_BOOL_2(52); 1 } );
ok( !eval { T_BOOL_2(0); 1 } );
ok( !eval { T_BOOL_2(''); 1 } );
}
{
- local $TODO = "Output parameters for T_BOOL don't work";
my ($in, $out);
$in = 1;
T_BOOL_OUT($out, $in);
T_ENUM
sv_setiv($arg, (IV)$var);
T_BOOL
- $arg = boolSV($var);
+ ${"$var" eq "RETVAL" ? \"$arg = boolSV($var);" : \"sv_setsv($arg, boolSV($var));"}
T_U_INT
sv_setuv($arg, (UV)$var);
T_SHORT