From: Vincent Pit Date: Tue, 10 Mar 2015 20:02:17 +0000 (-0300) Subject: Simplify vmg_propagate_errsv_free() so that ERRSV is not used as a lvalue X-Git-Tag: rt101410 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=31912cdd4443531ce1ceb07755cdde4f84785b39;p=perl%2Fmodules%2FVariable-Magic.git Simplify vmg_propagate_errsv_free() so that ERRSV is not used as a lvalue --- diff --git a/Magic.xs b/Magic.xs index 3419502..5ca81e3 100644 --- a/Magic.xs +++ b/Magic.xs @@ -1386,11 +1386,8 @@ STATIC OP *vmg_pp_propagate_errsv(pTHX) { #endif /* VMG_PROPAGATE_ERRSV_NEEDS_TRAMPOLINE */ STATIC int vmg_propagate_errsv_free(pTHX_ SV *sv, MAGIC *mg) { - if (mg->mg_obj) { - ERRSV = mg->mg_obj; - mg->mg_obj = NULL; - mg->mg_flags &= ~MGf_REFCOUNTED; - } + if (mg->mg_obj) + sv_setsv(ERRSV, mg->mg_obj); return 0; }