From: Vincent Pit Date: Thu, 29 Jan 2009 13:10:23 +0000 (+0100) Subject: Don't even define a CLONE sub when the module isn't thread safe X-Git-Tag: v0.29~6 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=fbbe2a83ed1d928afe5a634f01c1b653d7288d9c;p=perl%2Fmodules%2FVariable-Magic.git Don't even define a CLONE sub when the module isn't thread safe --- diff --git a/Magic.xs b/Magic.xs index 5e46124..5b4576a 100644 --- a/Magic.xs +++ b/Magic.xs @@ -971,13 +971,14 @@ BOOT: newCONSTSUB(stash, "VMG_THREADSAFE", newSVuv(VMG_THREADSAFE)); } +#if VMG_THREADSAFE + void CLONE(...) PROTOTYPE: DISABLE PREINIT: HV *hv; CODE: -#if VMG_THREADSAFE { HE *key; dMY_CXT; @@ -1000,6 +1001,7 @@ CODE: MY_CXT_CLONE; MY_CXT = hv; } + #endif /* VMG_THREADSAFE */ SV *_wizard(...)