diff options
author | unknown <E:\Ladik\Mail> | 2015-04-22 05:06:22 +0200 |
---|---|---|
committer | unknown <E:\Ladik\Mail> | 2015-04-22 05:06:22 +0200 |
commit | c538757a38df05a60f306fe8b193c4bc38f78a7b (patch) | |
tree | d7909cbbe4ddecfa6f09783f782b08036da3e8ed /src | |
parent | 5747ad4910966b27b4da3f0d0e5f085697e5bf7b (diff) |
+ Added STORM_REALLOC
Diffstat (limited to 'src')
-rw-r--r-- | src/StormCommon.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/StormCommon.h b/src/StormCommon.h index c806ce0..25f148e 100644 --- a/src/StormCommon.h +++ b/src/StormCommon.h @@ -107,13 +107,15 @@ typedef struct _MPQ_SIGNATURE_INFO #if defined(_MSC_VER) && defined(_DEBUG) -#define STORM_ALLOC(type, nitems) (type *)HeapAlloc(GetProcessHeap(), 0, ((nitems) * sizeof(type))) -#define STORM_FREE(ptr) HeapFree(GetProcessHeap(), 0, ptr) +#define STORM_ALLOC(type, nitems) (type *)HeapAlloc(GetProcessHeap(), 0, ((nitems) * sizeof(type))) +#define STORM_REALLOC(type, ptr, nitems) (type *)HeapReAlloc(GetProcessHeap(), 0, ptr, ((nitems) * sizeof(type))) +#define STORM_FREE(ptr) HeapFree(GetProcessHeap(), 0, ptr) #else -#define STORM_ALLOC(type, nitems) (type *)malloc((nitems) * sizeof(type)) -#define STORM_FREE(ptr) free(ptr) +#define STORM_ALLOC(type, nitems) (type *)malloc((nitems) * sizeof(type)) +#define STORM_REALLOC(type, ptr, nitems) (type *)realloc(ptr, ((nitems) * sizeof(type))) +#define STORM_FREE(ptr) free(ptr) #endif |