X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Magic.xs;h=7fee00e5773d0d1ffb29c8801d6ffb15ce9b4dd1;hb=6d398b4ceb1bdd5d01a6fbf16f6092444fd4a878;hp=bf413ff0329b69ed1af14bced53f689fdd31d211;hpb=9313f2dc8e1f534131fee3e6235f4a533396a0ac;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/Magic.xs b/Magic.xs index bf413ff..7fee00e 100644 --- a/Magic.xs +++ b/Magic.xs @@ -1195,13 +1195,13 @@ STATIC int vmg_svt_free(pTHX_ SV *sv, MAGIC *mg) { return ret; } -STATIC int vmg_svt_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, const char *key, -# if VMG_HAS_PERL_MAINT(5, 11, 0, 33256) || VMG_HAS_PERL(5, 12, 0) - I32 keylen -# else - int keylen -# endif - ) { +#if VMG_HAS_PERL_MAINT(5, 11, 0, 33256) || VMG_HAS_PERL(5, 12, 0) +# define VMG_SVT_COPY_KEYLEN_TYPE I32 +#else +# define VMG_SVT_COPY_KEYLEN_TYPE int +#endif + +STATIC int vmg_svt_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, const char *key, VMG_SVT_COPY_KEYLEN_TYPE keylen) { const vmg_wizard *w = vmg_wizard_from_mg_nocheck(mg); SV *keysv; int ret; @@ -1305,16 +1305,16 @@ STATIC I32 vmg_svt_val(pTHX_ IV action, SV *sv) { * mistaken for a tied hash by the rest of hv_common. It will be reset by * the op_ppaddr of a new fake op injected between the current and the next * one. */ - OP *o = PL_op; - if (!o->op_next || o->op_next->op_ppaddr != vmg_pp_resetuvar) { + OP *nop = PL_op->op_next; + if (!nop || nop->op_ppaddr != vmg_pp_resetuvar) { SVOP *svop; NewOp(1101, svop, 1, SVOP); svop->op_type = OP_STUB; svop->op_ppaddr = vmg_pp_resetuvar; - svop->op_next = o->op_next; + svop->op_next = nop; svop->op_flags = 0; svop->op_sv = sv; - o->op_next = (OP *) svop; + PL_op->op_next = (OP *) svop; } SvRMAGICAL_off(sv); }