From: gfx Date: Mon, 11 Jan 2010 05:34:43 +0000 (+0900) Subject: Use sv_true() instead of SvTRUE(), which is too large to inline X-Git-Tag: 0.47~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6ad77996af3989f512a308404b2593c369d18e14;p=gitmo%2FMouse.git Use sv_true() instead of SvTRUE(), which is too large to inline --- diff --git a/xs-src/Mouse.xs b/xs-src/Mouse.xs index 372713d..a7d8dec 100644 --- a/xs-src/Mouse.xs +++ b/xs-src/Mouse.xs @@ -633,7 +633,7 @@ CODE: PUTBACK; call_sv(AvARRAY(demolishall)[i], G_VOID | G_DISCARD | G_EVAL); - if(SvTRUE(ERRSV)){ + if(sv_true(ERRSV)){ SV* const e = newSVsv(ERRSV); FREETMPS; diff --git a/xs-src/MouseAttribute.xs b/xs-src/MouseAttribute.xs index a11471f..97b282e 100644 --- a/xs-src/MouseAttribute.xs +++ b/xs-src/MouseAttribute.xs @@ -48,10 +48,10 @@ mouse_get_xa(pTHX_ SV* const attr) { 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{ diff --git a/xs-src/MouseTypeConstraints.xs b/xs-src/MouseTypeConstraints.xs index 41a1d79..08df0e8 100644 --- a/xs-src/MouseTypeConstraints.xs +++ b/xs-src/MouseTypeConstraints.xs @@ -44,7 +44,7 @@ mouse_tc_check(pTHX_ SV* const tc_code, SV* const sv) { call_sv(tc_code, G_SCALAR); SPAGAIN; - ok = SvTRUEx(POPs); + ok = sv_true(POPs); PUTBACK; FREETMPS; @@ -69,7 +69,7 @@ int 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; } @@ -409,9 +409,7 @@ mouse_is_an_instance_of(pTHX_ HV* const stash, SV* const instance){ call_sv((SV*)instance_isa, G_SCALAR); SPAGAIN; - - retval = SvTRUEx(POPs); - + retval = sv_true(POPs); PUTBACK; FREETMPS; @@ -462,8 +460,7 @@ mouse_can_methods(pTHX_ AV* const methods, SV* const instance){ call_method("can", G_SCALAR); SPAGAIN; - ok = SvTRUE(TOPs); - (void)POPs; + ok = sv_true(POPs); PUTBACK; FREETMPS; diff --git a/xs-src/MouseUtil.xs b/xs-src/MouseUtil.xs index 93160fc..b8afb80 100644 --- a/xs-src/MouseUtil.xs +++ b/xs-src/MouseUtil.xs @@ -202,8 +202,7 @@ mouse_call1 (pTHX_ SV* const self, SV* const method, SV* const arg1) { 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*