diff options
author | Craig A. Berry <craigberry@mac.com> | 2009-03-07 14:33:04 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-03-07 14:33:04 -0600 |
commit | 8c472fc1d477ec4a43d02ce6fc6458f4004c738d (patch) | |
tree | 40fc59bd6156fe8297cc48abacba142c15754630 /win32/dl_win32.xs | |
parent | 4e71788c753f3f1e3668bcc2e7eae57e95c676e8 (diff) | |
download | perl-8c472fc1d477ec4a43d02ce6fc6458f4004c738d.tar.gz |
Make DynaLoader clone its private data under threads.
Diffstat (limited to 'win32/dl_win32.xs')
-rw-r--r-- | win32/dl_win32.xs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/win32/dl_win32.xs b/win32/dl_win32.xs index 6c094d22fd..60ec703b92 100644 --- a/win32/dl_win32.xs +++ b/win32/dl_win32.xs @@ -187,4 +187,19 @@ 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); + +#endif + # end. |