]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
Reorder a bit the wizard duplication logic to silence a cast warning
authorVincent Pit <vince@profvince.com>
Thu, 12 Feb 2009 20:26:02 +0000 (21:26 +0100)
committerVincent Pit <vince@profvince.com>
Thu, 12 Feb 2009 20:26:02 +0000 (21:26 +0100)
Magic.xs

index a922c2f5787e17342ab9195155947ba71fce27fb..985b37ff1771e3fbc3984062f2963e105b138700 100644 (file)
--- a/Magic.xs
+++ b/Magic.xs
@@ -1086,8 +1086,11 @@ CODE:
    STRLEN len;
    char *sig = HePV(key, len);
    SV *sv;
+   const MGWIZ *w;
    MAGIC *mg;
-   sv = MGWIZ2SV(vmg_wizard_clone(SV2MGWIZ(HeVAL(key))));
+   w  = SV2MGWIZ(HeVAL(key));
+   w  = vmg_wizard_clone(w);
+   sv = MGWIZ2SV(w);
    mg = sv_magicext(sv, NULL, PERL_MAGIC_ext, &vmg_wizard_vtbl, NULL, 0);
    mg->mg_private = SIG_WIZ;
    SvREADONLY_on(sv);