Module: wine Branch: master Commit: 4d30e7af47415d11363e71f9375a9e5f1cafd004 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4d30e7af47415d11363e71f937...
Author: Alexandre Julliard julliard@winehq.org Date: Fri May 8 14:12:40 2009 +0200
oleaut32/tests: Use the correct allocator in the ClearCustData test.
---
dlls/oleaut32/tests/vartype.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 0b4f301..7600946 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -5788,21 +5788,13 @@ static void test_UintChangeTypeEx(void)
static void test_ClearCustData(void) { - WCHAR buff[sizeof(CUSTDATAITEM) * NUM_CUST_ITEMS / sizeof(WCHAR)]; CUSTDATA ci; unsigned i;
CHECKPTR(ClearCustData);
- memset(buff, 0, sizeof(buff)); - ci.cCustData = NUM_CUST_ITEMS; - /* This is a bit tricky. We use SysAllocStringByteLen to allocate the - * array, since native uses an internal IMalloc interface for allocating - * its memory, while Wine uses HeapAlloc(). Doing this ensures we allocate - * using the correct function whether with native or builtin. - */ - ci.prgCustData = (LPCUSTDATAITEM)Get(SysAllocStringByteLen((LPCSTR)buff, sizeof(buff))); + ci.prgCustData = CoTaskMemAlloc( sizeof(CUSTDATAITEM) * NUM_CUST_ITEMS ); for (i = 0; i < NUM_CUST_ITEMS; i++) VariantInit(&ci.prgCustData[i].varValue); pClearCustData(&ci);