SV* const is_a_type_of = sv_2mortal(newSVpvs_share("is_a_type_of"));
flags |= MOUSEf_ATTR_SHOULD_AUTO_DEREF;
- if( SvTRUEx(mcall1(tc, is_a_type_of, newSVpvs_flags("ArrayRef", SVs_TEMP))) ){
+ if( sv_true(mcall1(tc, is_a_type_of, newSVpvs_flags("ArrayRef", SVs_TEMP))) ){
flags |= MOUSEf_TC_IS_ARRAYREF;
}
- else if( SvTRUEx(mcall1(tc, is_a_type_of, newSVpvs_flags("HashRef", SVs_TEMP))) ){
+ else if( sv_true(mcall1(tc, is_a_type_of, newSVpvs_flags("HashRef", SVs_TEMP))) ){
flags |= MOUSEf_TC_IS_HASHREF;
}
else{
call_sv(tc_code, G_SCALAR);
SPAGAIN;
- ok = SvTRUEx(POPs);
+ ok = sv_true(POPs);
PUTBACK;
FREETMPS;
mouse_tc_Bool(pTHX_ SV* const data PERL_UNUSED_DECL, SV* const sv) {
assert(sv);
- if(SvTRUE(sv)){
+ if(sv_true(sv)){
if(SvIOKp(sv)){
return SvIVX(sv) == 1;
}
call_sv((SV*)instance_isa, G_SCALAR);
SPAGAIN;
-
- retval = SvTRUEx(POPs);
-
+ retval = sv_true(POPs);
PUTBACK;
FREETMPS;
call_method("can", G_SCALAR);
SPAGAIN;
- ok = SvTRUE(TOPs);
- (void)POPs;
+ ok = sv_true(POPs);
PUTBACK;
FREETMPS;
int
mouse_predicate_call(pTHX_ SV* const self, SV* const method) {
- SV* const value = mcall0(self, method);
- return SvTRUE(value);
+ return sv_true( mcall0(self, method) );
}
SV*