oleaut32: Fix VariantCopy()/VariantCopyInd() prototypes.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-02-26 21:25:10 +03:00 committed by Alexandre Julliard
parent 4b2930d3f1
commit a55f4f9fc4
2 changed files with 9 additions and 8 deletions

View File

@ -689,10 +689,10 @@ HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG* pVarg)
/******************************************************************************
* Copy an IRecordInfo object contained in a variant.
*/
static HRESULT VARIANT_CopyIRecordInfo(VARIANT *dest, VARIANT *src)
static HRESULT VARIANT_CopyIRecordInfo(VARIANT *dest, const VARIANT *src)
{
struct __tagBRECORD *dest_rec = &V_UNION(dest, brecVal);
struct __tagBRECORD *src_rec = &V_UNION(src, brecVal);
const struct __tagBRECORD *src_rec = &V_UNION(src, brecVal);
HRESULT hr = S_OK;
ULONG size;
@ -745,7 +745,7 @@ static HRESULT VARIANT_CopyIRecordInfo(VARIANT *dest, VARIANT *src)
* reference count increased using IUnknown_AddRef().
* - For all by-reference types, only the referencing pointer is copied.
*/
HRESULT WINAPI VariantCopy(VARIANTARG* pvargDest, VARIANTARG* pvargSrc)
HRESULT WINAPI VariantCopy(VARIANTARG* pvargDest, const VARIANTARG* pvargSrc)
{
HRESULT hres = S_OK;
@ -844,9 +844,10 @@ static inline size_t VARIANT_DataSize(const VARIANT* pv)
* pvargDest is always cleared using VariantClear() before pvargSrc is copied
* to it. If clearing pvargDest fails, so does this function.
*/
HRESULT WINAPI VariantCopyInd(VARIANT* pvargDest, VARIANTARG* pvargSrc)
HRESULT WINAPI VariantCopyInd(VARIANT* pvargDest, const VARIANTARG* pvargSrc)
{
VARIANTARG vTmp, *pSrc = pvargSrc;
const VARIANTARG *pSrc = pvargSrc;
VARIANTARG vTmp;
VARTYPE vt;
HRESULT hres = S_OK;
@ -934,7 +935,7 @@ HRESULT WINAPI VariantCopyInd(VARIANT* pvargDest, VARIANTARG* pvargSrc)
VariantCopyInd_Return:
if (pSrc != pvargSrc)
VariantClear(pSrc);
VariantClear(&vTmp);
TRACE("returning 0x%08x, %s\n", hres, debugstr_variant(pvargDest));
return hres;

View File

@ -186,8 +186,8 @@ HRESULT WINAPI GetRecordInfoFromGuids(REFGUID,ULONG,ULONG,LCID,REFGUID,IRecordIn
void WINAPI VariantInit(VARIANT*);
HRESULT WINAPI VariantClear(VARIANT*);
HRESULT WINAPI VariantCopy(VARIANT*,VARIANT*);
HRESULT WINAPI VariantCopyInd(VARIANT*,VARIANT*);
HRESULT WINAPI VariantCopy(VARIANTARG *dst, const VARIANTARG *src);
HRESULT WINAPI VariantCopyInd(VARIANT *dst, const VARIANTARG *src);
HRESULT WINAPI VariantChangeType(VARIANT*,VARIANT*,USHORT,VARTYPE);
HRESULT WINAPI VariantChangeTypeEx(VARIANT*,VARIANT*,LCID,USHORT,VARTYPE);