From: Vincent Pit Date: Tue, 3 Mar 2009 00:47:26 +0000 (+0100) Subject: Make getsig() croak if the supplied wizard is incorrect X-Git-Tag: v0.33~14 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=a373cfef20bb5e4c99ba384ba650b36431908ade;p=perl%2Fmodules%2FVariable-Magic.git Make getsig() croak if the supplied wizard is incorrect --- diff --git a/Magic.xs b/Magic.xs index ab8a1c5..0bd0bfd 100644 --- a/Magic.xs +++ b/Magic.xs @@ -1408,10 +1408,11 @@ OUTPUT: SV *getsig(SV *wiz) PROTOTYPE: $ +PREINIT: + U16 sig; CODE: - if (!SvROK(wiz)) - croak(vmg_invalid_wiz); - RETVAL = newSVuv(SV2MGWIZ(SvRV(wiz))->sig); + sig = vmg_wizard_sig(wiz); + RETVAL = newSVuv(sig); OUTPUT: RETVAL