Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/msxml3/saxreader.c | 6 +++--- dlls/msxml3/schema.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index be2caf972b..e8d5b271d7 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -561,7 +561,7 @@ static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry) { if (!pool->pool) { - pool->pool = HeapAlloc(GetProcessHeap(), 0, 16 * sizeof(*pool->pool)); + pool->pool = heap_alloc(16 * sizeof(*pool->pool)); if (!pool->pool) return FALSE;
@@ -570,7 +570,7 @@ static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry) } else if (pool->index == pool->len) { - BSTR *realloc = HeapReAlloc(GetProcessHeap(), 0, pool->pool, pool->len * 2 * sizeof(*realloc)); + BSTR *realloc = heap_realloc(pool->pool, pool->len * 2 * sizeof(*realloc));
if (!realloc) return FALSE; @@ -590,7 +590,7 @@ static void free_bstr_pool(struct bstrpool *pool) for (i = 0; i < pool->index; i++) SysFreeString(pool->pool[i]);
- HeapFree(GetProcessHeap(), 0, pool->pool); + heap_free(pool->pool);
pool->pool = NULL; pool->index = pool->len = 0; diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c index 30272cbfdd..8087985204 100644 --- a/dlls/msxml3/schema.c +++ b/dlls/msxml3/schema.c @@ -749,7 +749,7 @@ void schemasInit(void) /* Resource is loaded as raw data, * need a null-terminated string */ while (buf[datatypes_len - 1] != '>') datatypes_len--; - datatypes_src = HeapAlloc(GetProcessHeap(), 0, datatypes_len + 1); + datatypes_src = heap_alloc(datatypes_len + 1); memcpy(datatypes_src, buf, datatypes_len); datatypes_src[datatypes_len] = 0;
@@ -763,7 +763,7 @@ void schemasInit(void) void schemasCleanup(void) { xmlSchemaFree(datatypes_schema); - HeapFree(GetProcessHeap(), 0, datatypes_src); + heap_free(datatypes_src); xmlSetExternalEntityLoader(_external_entity_loader); }
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/msxml3/tests/domdoc.c | 5 +++-- dlls/msxml3/tests/httpreq.c | 5 +++-- dlls/msxml3/tests/saxreader.c | 20 +++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 81e24935a4..7aeafa5e75 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -40,6 +40,7 @@ #include "initguid.h" #include "asptlb.h"
+#include "wine/heap.h" #include "wine/test.h"
/* undef the #define in msxml2 so that we can access all versions */ @@ -172,7 +173,7 @@ static ULONG WINAPI dispevent_Release(IDispatch *iface) ULONG ref = InterlockedDecrement( &This->ref );
if (ref == 0) - HeapFree(GetProcessHeap(), 0, This); + heap_free(This);
return ref; } @@ -232,7 +233,7 @@ static const IDispatchVtbl dispeventVtbl =
static IDispatch* create_dispevent(void) { - dispevent *event = HeapAlloc(GetProcessHeap(), 0, sizeof(*event)); + dispevent *event = heap_alloc(sizeof(*event));
event->IDispatch_iface.lpVtbl = &dispeventVtbl; event->ref = 1; diff --git a/dlls/msxml3/tests/httpreq.c b/dlls/msxml3/tests/httpreq.c index 538e23f684..4f51ef9faf 100644 --- a/dlls/msxml3/tests/httpreq.c +++ b/dlls/msxml3/tests/httpreq.c @@ -35,6 +35,7 @@ #include "objsafe.h" #include "mshtml.h"
+#include "wine/heap.h" #include "wine/test.h"
#define EXPECT_HR(hr,hr_exp) \ @@ -1243,7 +1244,7 @@ static ULONG WINAPI dispevent_Release(IDispatch *iface) ULONG ref = InterlockedDecrement( &This->ref );
if (ref == 0) - HeapFree(GetProcessHeap(), 0, This); + heap_free(This);
return ref; } @@ -1320,7 +1321,7 @@ static const IDispatchVtbl dispeventVtbl =
static IDispatch* create_dispevent(void) { - dispevent *event = HeapAlloc(GetProcessHeap(), 0, sizeof(*event)); + dispevent *event = heap_alloc(sizeof(*event));
event->IDispatch_iface.lpVtbl = &dispeventVtbl; event->ref = 1; diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index 34d11e6f22..9ebed62871 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -33,6 +33,7 @@ #include "ocidl.h" #include "dispex.h"
+#include "wine/heap.h" #include "wine/test.h"
static const WCHAR emptyW[] = {0}; @@ -257,16 +258,13 @@ static void add_call(struct call_sequence **seq, int sequence_index, if (!call_seq->sequence) { call_seq->size = 10; - call_seq->sequence = HeapAlloc(GetProcessHeap(), 0, - call_seq->size * sizeof (struct call_entry)); + call_seq->sequence = heap_alloc(call_seq->size * sizeof (struct call_entry)); }
if (call_seq->count == call_seq->size) { call_seq->size *= 2; - call_seq->sequence = HeapReAlloc(GetProcessHeap(), 0, - call_seq->sequence, - call_seq->size * sizeof (struct call_entry)); + call_seq->sequence = heap_realloc(call_seq->sequence, call_seq->size * sizeof (struct call_entry)); }
assert(call_seq->sequence); @@ -301,7 +299,7 @@ static inline void flush_sequence(struct call_sequence **seg, int sequence_index SysFreeString(call_seq->sequence[i].attributes[j].qnameW); SysFreeString(call_seq->sequence[i].attributes[j].valueW); } - HeapFree(GetProcessHeap(), 0, call_seq->sequence[i].attributes); + heap_free(call_seq->sequence[i].attributes); call_seq->sequence[i].attr_count = 0;
SysFreeString(call_seq->sequence[i].arg1W); @@ -309,7 +307,7 @@ static inline void flush_sequence(struct call_sequence **seg, int sequence_index SysFreeString(call_seq->sequence[i].arg3W); }
- HeapFree(GetProcessHeap(), 0, call_seq->sequence); + heap_free(call_seq->sequence); call_seq->sequence = NULL; call_seq->count = call_seq->size = 0; } @@ -536,7 +534,7 @@ static void init_call_sequences(struct call_sequence **seq, int n) int i;
for (i = 0; i < n; i++) - seq[i] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct call_sequence)); + seq[i] = heap_alloc_zero(sizeof(struct call_sequence)); }
static const WCHAR szSimpleXML[] = { @@ -1223,7 +1221,7 @@ static HRESULT WINAPI contentHandler_startElement( int i;
struct attribute_entry *attr; - attr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(struct attribute_entry)); + attr = heap_alloc_zero(len * sizeof(*attr));
v = VARIANT_TRUE; hr = ISAXXMLReader_getFeature(g_reader, _bstr_("http://xml.org/sax/features/namespaces"), &v); @@ -3307,7 +3305,7 @@ static void test_mxwriter_flush(void) ok(pos2.QuadPart == 0, "expected stream beginning\n");
len = 2048; - buff = HeapAlloc(GetProcessHeap(), 0, len+1); + buff = heap_alloc(len + 1); memset(buff, 'A', len); buff[len] = 0; hr = ISAXContentHandler_characters(content, _bstr_(buff), len); @@ -3390,7 +3388,7 @@ static void test_mxwriter_flush(void) ok(SysStringLen(V_BSTR(&dest)) == len, "got len=%d, expected %d\n", SysStringLen(V_BSTR(&dest)), len); VariantClear(&dest);
- HeapFree(GetProcessHeap(), 0, buff); + heap_free(buff); ISAXContentHandler_Release(content); IStream_Release(stream); IMXWriter_Release(writer);