From: Vincent Pit Date: Tue, 14 Apr 2015 17:12:44 +0000 (-0300) Subject: vmg_teardown() should also be called at the end of cloned threads X-Git-Tag: v0.57~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=de1bca58e695e4df40b7c597d8181cc6ca5d9bb9;p=perl%2Fmodules%2FVariable-Magic.git vmg_teardown() should also be called at the end of cloned threads This is achieved by removing the "top interpreter" guard in vmg_teardown(), which has been obsoleted by our new loaded refcount. --- diff --git a/Magic.xs b/Magic.xs index e6c2fdf..9eda482 100644 --- a/Magic.xs +++ b/Magic.xs @@ -1839,14 +1839,9 @@ static signed char vmg_destruct_level(pTHX) { #endif /* VMG_THREADSAFE */ -static void vmg_teardown(pTHX_ void *interp) { +static void vmg_teardown(pTHX_ void *param) { dMY_CXT; -#if VMG_MULTIPLICITY - if (aTHX != interp) - return; -#endif - #if VMG_THREADSAFE VMG_LOADED_LOCK; @@ -1937,11 +1932,7 @@ static void vmg_setup(pTHX) { newCONSTSUB(stash, "VMG_OP_INFO_NAME", newSVuv(VMG_OP_INFO_NAME)); newCONSTSUB(stash, "VMG_OP_INFO_OBJECT", newSVuv(VMG_OP_INFO_OBJECT)); -#if VMG_MULTIPLICITY - call_atexit(vmg_teardown, aTHX); -#else call_atexit(vmg_teardown, NULL); -#endif return; }