X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fperllib.c;h=d1d942c4956ac66a6e584e487f2644ad8b1f20a1;hb=9cc2fdd394015171a9ffc8bf66f62a26748f2a22;hp=c24941f11133cce3e0a1bbd98eaf0724702ea83d;hpb=bbc8f9de328519d89fa89d8fca21fe808800d6a2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/perllib.c b/win32/perllib.c index c24941f..d1d942c 100644 --- a/win32/perllib.c +++ b/win32/perllib.c @@ -9,14 +9,20 @@ static void xs_init _((void)); -__declspec(dllexport) int +DllExport int RunPerl(int argc, char **argv, char **env, void *iosubsystem) { int exitstatus; PerlInterpreter *my_perl; -#ifdef USE_THREADS - MUTEX_INIT(&malloc_mutex); +#ifdef PERL_GLOBAL_STRUCT +#define PERLVAR(var,type) /**/ +#define PERLVARI(var,type,init) PL_Vars.var = init; +#define PERLVARIC(var,type,init) PL_Vars.var = init; +#include "perlvars.h" +#undef PERLVAR +#undef PERLVARI +#undef PERLVARIC #endif PERL_SYS_INIT(&argc,&argv); @@ -26,7 +32,7 @@ RunPerl(int argc, char **argv, char **env, void *iosubsystem) if (!(my_perl = perl_alloc())) return (1); perl_construct( my_perl ); - perl_destruct_level = 0; + PL_perl_destruct_level = 0; exitstatus = perl_parse( my_perl, xs_init, argc, argv, env); if (!exitstatus) { @@ -41,7 +47,7 @@ RunPerl(int argc, char **argv, char **env, void *iosubsystem) return (exitstatus); } -extern HANDLE PerlDllHandle; +extern HANDLE w32_perldll_handle; BOOL APIENTRY DllMain(HANDLE hModule, /* DLL module handle */ @@ -60,7 +66,7 @@ DllMain(HANDLE hModule, /* DLL module handle */ setmode( fileno( stderr ), O_BINARY ); _fmode = O_BINARY; #endif - PerlDllHandle = hModule; + w32_perldll_handle = hModule; break; /* The DLL is detaching from a process due to