X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=xs-src%2FMouseAttribute.xs;h=63da0ce25f2f95b7bb99ed409cc98225afaf4797;hp=a11471fedc4c3e574b3b3cb9c721faf5c5a2a233;hb=4b7f0b170d8518b09bf776647b67ccf71b72aea0;hpb=ba1f50a24cf3b5c5a96ded5f68b030797bf17dd5 diff --git a/xs-src/MouseAttribute.xs b/xs-src/MouseAttribute.xs index a11471f..63da0ce 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{ @@ -111,7 +111,7 @@ mouse_xa_apply_type_constraint(pTHX_ AV* const xa, SV* value, U16 const flags){ SV* tc_code; if(flags & MOUSEf_ATTR_SHOULD_COERCE){ - value = mcall1s(tc, "coerce", value); + value = mcall1(tc, mouse_coerce, value); } if(!SvOK(MOUSE_xa_tc_code(xa))){ @@ -324,7 +324,7 @@ CODE: XPUSHs(*svp); PUTBACK; - call_pv("Mouse::Util::TypeConstraints::find_or_create_isa_type_constraint", + call_pv("Mouse::Util::TypeConstraints::find_or_create_does_type_constraint", G_SCALAR); SPAGAIN; tc = newSVsv(POPs);