From: gfx Date: Fri, 26 Feb 2010 06:32:28 +0000 (+0900) Subject: Fix a typo X-Git-Tag: 0.50_04~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=077f2efda66008ab1a1fb959851a7c9062404588;p=gitmo%2FMouse.git Fix a typo --- diff --git a/xs-src/MouseAttribute.xs b/xs-src/MouseAttribute.xs index f8012da..8ea3a06 100644 --- a/xs-src/MouseAttribute.xs +++ b/xs-src/MouseAttribute.xs @@ -297,7 +297,7 @@ CODE: svp = hv_fetchs(args, "builder", FALSE); if(svp){ if(!SvOK(*svp)){ - mouse_throw_error(klass, NULL, + mouse_throw_error(klass, *svp, "builder must be a defined scalar value which is a method name"); } can_be_required = TRUE; @@ -305,7 +305,7 @@ CODE: } else if((svp = hv_fetchs(args, "default", FALSE))){ if(SvROK(*svp) && SvTYPE(SvRV(*svp)) != SVt_PVCV) { - mouse_throw_error(klass, NULL, + mouse_throw_error(klass, *svp, "References are not allowed as default values, you must " "wrap the default of '%"SVf"' in a CODE reference " "(ex: sub { [] } and not [])", name); diff --git a/xs-src/MouseUtil.xs b/xs-src/MouseUtil.xs index d8e3f4c..92fa676 100644 --- a/xs-src/MouseUtil.xs +++ b/xs-src/MouseUtil.xs @@ -91,8 +91,6 @@ mouse_throw_error(SV* const metaobject, SV* const data /* not used */, const cha va_list args; SV* message; - PERL_UNUSED_ARG(data); /* for moose-compat */ - assert(metaobject); assert(fmt); @@ -103,13 +101,13 @@ mouse_throw_error(SV* const metaobject, SV* const data /* not used */, const cha { dSP; PUSHMARK(SP); - EXTEND(SP, 4); + EXTEND(SP, 6); PUSHs(metaobject); mPUSHs(message); if(data){ /* extra arg, might be useful for debugging */ - mPUSHs(newSVpsv("data")); + mPUSHs(newSVpvs("data")); PUSHs(data); mPUSHs(newSVpvs("depth")); mPUSHi(-1);