From: Vincent Pit Date: Sun, 25 Jan 2009 16:50:54 +0000 (+0100) Subject: Comment revamp in vmg_svt_free() X-Git-Tag: v0.29~8 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=efeec3ba13ae51a34cf68c55022e8668cad3968c;p=perl%2Fmodules%2FVariable-Magic.git Comment revamp in vmg_svt_free() --- diff --git a/Magic.xs b/Magic.xs index 76e8821..08c61d2 100644 --- a/Magic.xs +++ b/Magic.xs @@ -594,7 +594,7 @@ STATIC int vmg_svt_free(pTHX_ SV *sv, MAGIC *mg) { if (SvTYPE(wiz) == SVTYPEMASK) return 0; - /* So that it can survive tmp cleanup in vmg_cb_call */ + /* So that it survives the temp cleanup in vmg_cb_call */ SvREFCNT_inc(sv); #if !VMG_HAS_PERL_MAINT(5, 11, 0, 32686) @@ -604,14 +604,14 @@ STATIC int vmg_svt_free(pTHX_ SV *sv, MAGIC *mg) { SvMAGIC_set(sv, mg); #endif - /* Perl_mg_free will get rid of the magic and decrement mg->mg_obj and - * mg->mg_ptr reference count */ ret = vmg_cb_call1e(SV2MGWIZ(wiz)->cb_free, sv, mg->mg_obj); /* Calling SvREFCNT_dec() will trigger destructors in an infinite loop, so * we have to rely on SvREFCNT() being a lvalue. Heck, even the core does it */ --SvREFCNT(sv); + /* Perl_mg_free will get rid of the magic and decrement mg->mg_obj and + * mg->mg_ptr reference count */ return ret; }