From: gfx Date: Sat, 31 Oct 2009 06:24:40 +0000 (+0900) Subject: Tidy X-Git-Tag: 0.40_04~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=263728b50f9b186175c060951317bd457a082ca7;p=gitmo%2FMouse.git Tidy --- diff --git a/xs-src/MouseAccessor.xs b/xs-src/MouseAccessor.xs index ee7bf8d..6af6b03 100644 --- a/xs-src/MouseAccessor.xs +++ b/xs-src/MouseAccessor.xs @@ -164,6 +164,7 @@ mouse_apply_type_constraint(pTHX_ AV* const xa, SV* value, U16 const flags){ if(!SvOK(MOUSE_xa_tc_code(xa))){ tc_code = mcall0s(tc, "_compiled_type_constraint"); av_store(xa, MOUSE_XA_TC_CODE, newSVsv(tc_code)); + if(!(SvROK(tc_code) && SvTYPE(SvRV(tc_code)) == SVt_PVCV)){ mouse_throw_error(MOUSE_xa_attribute(xa), tc, "Not a CODE reference"); }