X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FDynaLoader%2Fdl_dld.xs;h=b60d25baeebead60bdee4d5cbb9d8fa103f5ce09;hb=dcfdccf94c5ada3342776b740fd487168bef3ca3;hp=ab72ca3c6ce065e0aaedd0f645c6287e36fa311b;hpb=d3f5e39945c1adca90422be3853d860ba9478c11;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/DynaLoader/dl_dld.xs b/ext/DynaLoader/dl_dld.xs index ab72ca3..b60d25b 100644 --- a/ext/DynaLoader/dl_dld.xs +++ b/ext/DynaLoader/dl_dld.xs @@ -187,4 +187,21 @@ 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); + dl_require_symbols = get_av("DynaLoader::dl_require_symbols", GV_ADDMULTI); + +#endif + # end.