This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Replace repetitive code in lib/File/stat.t with a data driven loop.
[perl5.git] / ext / DynaLoader / dl_next.xs
index 40842fd..e5774c0 100644 (file)
@@ -321,4 +321,20 @@ dl_error()
     OUTPUT:
     RETVAL
 
+#if defined(USE_ITHREADS)
+
+void
+CLONE(...)
+    CODE:
+    MY_CXT_CLONE;
+
+    /* MY_CXT_CLONE just does a memcpy on the whole structure, so to avoid
+     * using Perl variables that belong to another thread, we create our 
+     * own for this thread.
+     */
+    MY_CXT.x_dl_last_error = newSVpvn("", 0);
+    dl_resolve_using = get_av("DynaLoader::dl_resolve_using", GV_ADDMULTI);
+
+#endif
+
 # end.