int
MyLib::strToInt(passfailSV)
SV* passfailSV
PREINIT:
bool passfail;
CODE:
foo(&passfail);
SvSetMagicSV(passfailSV, passfail ? &PL_sv_yes : &PL_sv_no);
OUTPUT:
RETVAL
####
T_BOOL
$arg = boolSV($var);
####
/*
=for apidoc Am|SV *|boolSV|bool b
Returns a true SV if C is a true value, or a false SV if C is 0.
See also C and C.
=cut
*/
#define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)