X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fperllib.c;h=4e4c11396441cff9b35cd82e2998980a9f620910;hb=732266dc6ae9a10c35695fe9bd9850ecaa70acb6;hp=6243a79fd3d4ea21dfdc6168db79de7924a3df44;hpb=acfe0abcedaf592fb4b9cb69ce3468308ae99d91;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/perllib.c b/win32/perllib.c index 6243a79..4e4c113 100644 --- a/win32/perllib.c +++ b/win32/perllib.c @@ -33,6 +33,17 @@ xs_init(pTHX) #include "perlhost.h" +void +win32_checkTLS(PerlInterpreter *host_perl) +{ + dTHX; + if (host_perl != my_perl) { + int *nowhere = NULL; + *nowhere = 0; + abort(); + } +} + EXTERN_C void perl_get_host_info(struct IPerlMemInfo* perlMemInfo, struct IPerlMemInfo* perlMemSharedInfo, @@ -105,6 +116,7 @@ perl_alloc_override(struct IPerlMem** ppMem, struct IPerlMem** ppMemShared, pHost->m_pHostperlProc); if (my_perl) { w32_internal_host = pHost; + pHost->host_perl = my_perl; } } return my_perl; @@ -127,6 +139,7 @@ perl_alloc(void) pHost->m_pHostperlProc); if (my_perl) { w32_internal_host = pHost; + pHost->host_perl = my_perl; } } return my_perl; @@ -287,6 +300,7 @@ perl_clone_host(PerlInterpreter* proto_perl, UV flags) { h->m_pHostperlProc ); proto_perl->Isys_intern.internal_host = h; + h->host_perl = proto_perl; return proto_perl; }