wdll: fixed operator_new (discussed at meeting) issue - turns out that was a bad idea. unless mmgr.h is included, operator_new isn't defined, so it's taken to be a function => it was never getting called in wdll

defining operator_new in a global file is a bad idea-  if we forget
that, hard-to-track errors result
so, no more operator new; instead, #include "nommgr.h" before local
operator new definitions and #include "mmgr.h" again afterwards

This was SVN commit r1824.
This commit is contained in:
janwas 2005-01-26 01:05:22 +00:00
parent 228f225e8d
commit 3e82535375

View File

@ -185,6 +185,8 @@ CountOfImports(PCImgThunkData pitdBase) {
extern "C" PUnloadInfo __puiHead = 0;
#include "nommgr.h"
struct ULI : public UnloadInfo
{
ULI(PCImgDelayDescr pidd_)
@ -195,7 +197,7 @@ struct ULI : public UnloadInfo
~ULI() { Unlink(); }
void* operator_new(size_t cb) { return ::LocalAlloc(LPTR, cb); }
void* operator new(size_t cb) { return ::LocalAlloc(LPTR, cb); }
void operator delete(void* pv) { ::LocalFree(pv); }
void Unlink()
@ -215,6 +217,8 @@ struct ULI : public UnloadInfo
}
};
#include "mmgr.h"
// For our own internal use, we convert to the old
// format for convenience.