Commit a55f4f9f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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

parent 4b2930d3
...@@ -689,10 +689,10 @@ HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG* pVarg) ...@@ -689,10 +689,10 @@ HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG* pVarg)
/****************************************************************************** /******************************************************************************
* Copy an IRecordInfo object contained in a variant. * 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 *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; HRESULT hr = S_OK;
ULONG size; ULONG size;
...@@ -745,7 +745,7 @@ static HRESULT VARIANT_CopyIRecordInfo(VARIANT *dest, VARIANT *src) ...@@ -745,7 +745,7 @@ static HRESULT VARIANT_CopyIRecordInfo(VARIANT *dest, VARIANT *src)
* reference count increased using IUnknown_AddRef(). * reference count increased using IUnknown_AddRef().
* - For all by-reference types, only the referencing pointer is copied. * - 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; HRESULT hres = S_OK;
...@@ -844,9 +844,10 @@ static inline size_t VARIANT_DataSize(const VARIANT* pv) ...@@ -844,9 +844,10 @@ static inline size_t VARIANT_DataSize(const VARIANT* pv)
* pvargDest is always cleared using VariantClear() before pvargSrc is copied * pvargDest is always cleared using VariantClear() before pvargSrc is copied
* to it. If clearing pvargDest fails, so does this function. * 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; VARTYPE vt;
HRESULT hres = S_OK; HRESULT hres = S_OK;
...@@ -934,7 +935,7 @@ HRESULT WINAPI VariantCopyInd(VARIANT* pvargDest, VARIANTARG* pvargSrc) ...@@ -934,7 +935,7 @@ HRESULT WINAPI VariantCopyInd(VARIANT* pvargDest, VARIANTARG* pvargSrc)
VariantCopyInd_Return: VariantCopyInd_Return:
if (pSrc != pvargSrc) if (pSrc != pvargSrc)
VariantClear(pSrc); VariantClear(&vTmp);
TRACE("returning 0x%08x, %s\n", hres, debugstr_variant(pvargDest)); TRACE("returning 0x%08x, %s\n", hres, debugstr_variant(pvargDest));
return hres; return hres;
......
...@@ -186,8 +186,8 @@ HRESULT WINAPI GetRecordInfoFromGuids(REFGUID,ULONG,ULONG,LCID,REFGUID,IRecordIn ...@@ -186,8 +186,8 @@ HRESULT WINAPI GetRecordInfoFromGuids(REFGUID,ULONG,ULONG,LCID,REFGUID,IRecordIn
void WINAPI VariantInit(VARIANT*); void WINAPI VariantInit(VARIANT*);
HRESULT WINAPI VariantClear(VARIANT*); HRESULT WINAPI VariantClear(VARIANT*);
HRESULT WINAPI VariantCopy(VARIANT*,VARIANT*); HRESULT WINAPI VariantCopy(VARIANTARG *dst, const VARIANTARG *src);
HRESULT WINAPI VariantCopyInd(VARIANT*,VARIANT*); HRESULT WINAPI VariantCopyInd(VARIANT *dst, const VARIANTARG *src);
HRESULT WINAPI VariantChangeType(VARIANT*,VARIANT*,USHORT,VARTYPE); HRESULT WINAPI VariantChangeType(VARIANT*,VARIANT*,USHORT,VARTYPE);
HRESULT WINAPI VariantChangeTypeEx(VARIANT*,VARIANT*,LCID,USHORT,VARTYPE); HRESULT WINAPI VariantChangeTypeEx(VARIANT*,VARIANT*,LCID,USHORT,VARTYPE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment