]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - Magic.xs
Don't even define a CLONE sub when the module isn't thread safe
[perl/modules/Variable-Magic.git] / Magic.xs
index 5e461242b6dbf8b2b97071052aaee1f2031362c0..5b4576aed6b1da7f3dfdc55e987aeb52495034a3 100644 (file)
--- 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(...)