[PATCH] ole32: Use the global HeapAlloc() wrappers
Michael Stefaniuc
mstefani at winehq.org
Thu Feb 1 18:03:56 CST 2018
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/ole32/compobj_private.h | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h
index 0f10a7c0c4..9e65c3ec0c 100644
--- a/dlls/ole32/compobj_private.h
+++ b/dlls/ole32/compobj_private.h
@@ -30,6 +30,7 @@
#include <stdarg.h>
#include "wine/list.h"
+#include "wine/heap.h"
#include "windef.h"
#include "winbase.h"
@@ -259,7 +260,7 @@ void leave_apartment(struct oletls *info) DECLSPEC_HIDDEN;
static inline struct oletls *COM_CurrentInfo(void)
{
if (!NtCurrentTeb()->ReservedForOle)
- NtCurrentTeb()->ReservedForOle = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct oletls));
+ NtCurrentTeb()->ReservedForOle = heap_alloc_zero(sizeof(struct oletls));
return NtCurrentTeb()->ReservedForOle;
}
@@ -323,16 +324,6 @@ extern BOOL actctx_get_miscstatus(const CLSID*, DWORD, DWORD*) DECLSPEC_HIDDEN;
extern const char *debugstr_formatetc(const FORMATETC *formatetc) DECLSPEC_HIDDEN;
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
-{
- return HeapAlloc(GetProcessHeap(), 0, len);
-}
-
-static inline BOOL heap_free(void *mem)
-{
- return HeapFree(GetProcessHeap(), 0, mem);
-}
-
static inline HRESULT copy_formatetc(FORMATETC *dst, const FORMATETC *src)
{
*dst = *src;
--
2.14.3
More information about the wine-devel
mailing list