| 1 |
// Unicode support by Jim Park -- 08/22/2007 |
| 2 |
|
| 3 |
#pragma once |
| 4 |
|
| 5 |
#include <nsis/pluginapi.h> // nsis plugin |
| 6 |
#include <nsis/nsis_tchar.h> |
| 7 |
|
| 8 |
#ifdef _DEBUG |
| 9 |
//#define _DEBUG_LEAKS |
| 10 |
#endif |
| 11 |
|
| 12 |
#ifdef _DEBUG_LEAKS |
| 13 |
|
| 14 |
#define dbgGlobalAlloc(a, b) watchGlobalAlloc(a, b) |
| 15 |
#define dbgGlobalFree(a) watchGlobalFree(a) |
| 16 |
#define dbgGlobalCheck() watchGlobal(); |
| 17 |
void watchGlobal(); |
| 18 |
void watchGlobalFree(HGLOBAL block); |
| 19 |
HGLOBAL watchGlobalAlloc(UINT Flags, UINT size); |
| 20 |
|
| 21 |
#else |
| 22 |
|
| 23 |
#define dbgGlobalAlloc(a, b) GlobalAlloc(a, b) |
| 24 |
#define dbgGlobalFree(a) GlobalFree(a) |
| 25 |
#define dbgGlobalCheck() {}; |
| 26 |
|
| 27 |
#endif |
| 28 |
|
| 29 |
TCHAR *AllocString(); |
| 30 |
ExpressionItem *AllocItem(); |
| 31 |
ExpressionItem *AllocArray(int size); |
| 32 |
ExpressionItem *CopyItem(ExpressionItem *item, int NeedConst = 0); |