From: gfx Date: Sun, 1 Nov 2009 02:49:48 +0000 (+0900) Subject: Change TC hierarchy in XS X-Git-Tag: 0.40_04~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dfbc05003792a24ba9d4212c49c63f437e519119;p=gitmo%2FMouse.git Change TC hierarchy in XS --- diff --git a/mouse.h b/mouse.h index d198f38..2b75762 100644 --- a/mouse.h +++ b/mouse.h @@ -133,9 +133,9 @@ XS(mouse_xs_reader); XS(mouse_xs_writer); typedef enum mouse_tc{ - MOUSE_TC_MAYBE, MOUSE_TC_ANY, MOUSE_TC_ITEM, + MOUSE_TC_MAYBE, MOUSE_TC_UNDEF, MOUSE_TC_DEFINED, MOUSE_TC_BOOL, diff --git a/xs-src/MouseTypeConstraints.xs b/xs-src/MouseTypeConstraints.xs index 48fa08e..e5b2c21 100644 --- a/xs-src/MouseTypeConstraints.xs +++ b/xs-src/MouseTypeConstraints.xs @@ -22,11 +22,9 @@ mouse_tc_check(pTHX_ SV* const tc_code, SV* const sv) { assert(SvTYPE(cv) == SVt_PVCV); if(CvXSUB(cv) == XS_Mouse__Util__TypeConstraints_Item){ /* built-in */ - assert(CvXSUBANY(cv).any_iv > 0); - return mouse_builtin_tc_check(aTHX_ CvXSUBANY(cv).any_iv, sv); } - else if(CvXSUB(cv) == XS_Mouse_parameterized_check){ /* built-in, parameterizad */ + else if(CvXSUB(cv) == XS_Mouse_parameterized_check){ /* complex type constraints */ MAGIC* const mg = (MAGIC*)CvXSUBANY(cv).any_ptr; assert(CvXSUBANY(cv).any_ptr != NULL);