X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xs-src%2FMouseUtil.xs;h=8d0c51a702d05394b7f9f58f970bd272715d062b;hb=abbcd124154fda138a43e996d4a521c79d16d72d;hp=ae5fb39ac3d5bd220bb8432d917014696af0397a;hpb=f0e1969bc2752f79154513a6df9b46571ee3e8ba;p=gitmo%2FMouse.git diff --git a/xs-src/MouseUtil.xs b/xs-src/MouseUtil.xs index ae5fb39..8d0c51a 100644 --- a/xs-src/MouseUtil.xs +++ b/xs-src/MouseUtil.xs @@ -112,10 +112,13 @@ mouse_throw_error(SV* const metaobject, SV* const data /* not used */, const cha mPUSHs(newSVpvs("depth")); mPUSHi(-1); } - PUTBACK; - - call_method("throw_error", G_VOID); + if(SvOK(metaobject)) { + call_method("throw_error", G_VOID); + } + else { + call_pv("Mouse::Util::throw_error", G_VOID); + } croak("throw_error() did not throw the error (%"SVf")", message); } } @@ -348,7 +351,7 @@ mouse_install_sub(pTHX_ GV* const gv, SV* const code_ref) { } } - CvGV(cv) = gv; + CvGV_set(cv, gv); CvANON_off(cv); } }