X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=globals.c;h=9777273ee6a4564f2446467a3faf08795f951fcb;hb=52a043e6cc1df667f590107cf208184857a066bd;hp=8ac296d009fb82e94f66f0c337f03894c2324850;hpb=4f63d0249796d635a70b03245ad972152a3eba76;p=p5sagit%2Fp5-mst-13.2.git diff --git a/globals.c b/globals.c index 8ac296d..9777273 100644 --- a/globals.c +++ b/globals.c @@ -6,6 +6,8 @@ #undef PERLVAR #define PERLVAR(x, y) +#undef PERLVARA +#define PERLVARA(x, n, y) #undef PERLVARI #define PERLVARI(x, y, z) PL_##x = z; #undef PERLVARIC @@ -21,28 +23,29 @@ CPerlObj::CPerlObj(IPerlMem* ipM, IPerlEnv* ipE, IPerlStdIO* ipStd, #include "intrpvar.h" #include "perlvars.h" - PL_piMem = ipM; - PL_piENV = ipE; - PL_piStdIO = ipStd; - PL_piLIO = ipLIO; - PL_piDir = ipD; - PL_piSock = ipS; - PL_piProc = ipP; + PL_Mem = ipM; + PL_Env = ipE; + PL_StdIO = ipStd; + PL_LIO = ipLIO; + PL_Dir = ipD; + PL_Sock = ipS; + PL_Proc = ipP; } void* CPerlObj::operator new(size_t nSize, IPerlMem *pvtbl) { - if(pvtbl != NULL) - return pvtbl->Malloc(nSize); + if(pvtbl) + return pvtbl->pMalloc(pvtbl, nSize); return NULL; } -int& -CPerlObj::ErrorNo(void) +void +CPerlObj::operator delete(void *pPerl, IPerlMem *pvtbl) { - return errno; + if(pvtbl) + pvtbl->pFree(pvtbl, pPerl); } void @@ -50,4 +53,27 @@ CPerlObj::Init(void) { } +#ifdef WIN32 /* XXX why are these needed? */ +bool +Perl_do_exec(char *cmd) +{ + return PerlProc_Cmd(cmd); +} + +int +CPerlObj::do_aspawn(void *vreally, void **vmark, void **vsp) +{ + return PerlProc_aspawn(vreally, vmark, vsp); +} +#endif /* WIN32 */ + #endif /* PERL_OBJECT */ + +int +Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) +{ + dTHX; + va_list(arglist); + va_start(arglist, format); + return PerlIO_vprintf(stream, format, arglist); +}