Nikolay Sivov : xmllite/tests: Use the global HeapAlloc() wrappers.
Alexandre Julliard
julliard at winehq.org
Thu Feb 8 15:33:08 CST 2018
Module: wine
Branch: master
Commit: f826b25019e7cc6856dbaf11bd07bf45e82719f2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f826b25019e7cc6856dbaf11bd07bf45e82719f2
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Feb 8 14:17:02 2018 +0300
xmllite/tests: Use the global HeapAlloc() wrappers.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/xmllite/tests/reader.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c
index 0033776..3cdc177 100644
--- a/dlls/xmllite/tests/reader.c
+++ b/dlls/xmllite/tests/reader.c
@@ -30,20 +30,21 @@
#include "ole2.h"
#include "xmllite.h"
#include "wine/test.h"
+#include "wine/heap.h"
DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda);
static WCHAR *a2w(const char *str)
{
int len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
- WCHAR *ret = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
+ WCHAR *ret = heap_alloc(len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
return ret;
}
static void free_str(WCHAR *str)
{
- HeapFree(GetProcessHeap(), 0, str);
+ heap_free(str);
}
static int strcmp_wa(const WCHAR *str1, const char *stra)
@@ -408,9 +409,7 @@ static ULONG WINAPI testinput_Release(IUnknown *iface)
ref = InterlockedDecrement(&This->ref);
if (ref == 0)
- {
- HeapFree(GetProcessHeap(), 0, This);
- }
+ heap_free(This);
return ref;
}
@@ -426,7 +425,7 @@ static HRESULT testinput_createinstance(void **ppObj)
{
testinput *input;
- input = HeapAlloc(GetProcessHeap(), 0, sizeof (*input));
+ input = heap_alloc(sizeof(*input));
if(!input) return E_OUTOFMEMORY;
input->IUnknown_iface.lpVtbl = &testinput_vtbl;
More information about the wine-cvs
mailing list