X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=xs-src%2FMouse.xs;h=a7d8dec91e4e82afed150e98225654244cc488e5;hp=b3d411c1e8029dfa8c10033f27d0b3934a35787f;hb=6ad77996af3989f512a308404b2593c369d18e14;hpb=80efe91126e926233fade8bdd58288929286fc09 diff --git a/xs-src/Mouse.xs b/xs-src/Mouse.xs index b3d411c..a7d8dec 100644 --- a/xs-src/Mouse.xs +++ b/xs-src/Mouse.xs @@ -249,6 +249,10 @@ mouse_class_initialize_object(pTHX_ SV* const meta, SV* const object, HV* const assert(args); assert(SvTYPE(args) == SVt_PVHV); + if(mg_find((SV*)args, PERL_MAGIC_tied)){ + croak("You cannot use tied HASH reference as initializing arguments"); + } + ENTER; SAVETMPS; @@ -629,7 +633,7 @@ CODE: PUTBACK; call_sv(AvARRAY(demolishall)[i], G_VOID | G_DISCARD | G_EVAL); - if(SvTRUE(ERRSV)){ + if(sv_true(ERRSV)){ SV* const e = newSVsv(ERRSV); FREETMPS; @@ -663,8 +667,5 @@ CODE: if(!IsHashRef(args)){ croak("You must pass a HASH reference to BUILDALL"); } - if(mg_find(SvRV(args), PERL_MAGIC_tied)){ - croak("You cannot use tie HASH reference as args"); - } mouse_buildall(aTHX_ xc, self, args); }