Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b6c5bae7
Commit
b6c5bae7
authored
Jul 06, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Don't use __tagBRECORD type.
parent
b87e9620
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
20 deletions
+17
-20
variant.c
dlls/oleaut32/variant.c
+17
-20
No files found.
dlls/oleaut32/variant.c
View file @
b6c5bae7
...
@@ -585,11 +585,11 @@ HRESULT VARIANT_ClearInd(VARIANTARG *pVarg)
...
@@ -585,11 +585,11 @@ HRESULT VARIANT_ClearInd(VARIANTARG *pVarg)
case
VT_RECORD
:
case
VT_RECORD
:
case
VT_RECORD
|
VT_BYREF
:
case
VT_RECORD
|
VT_BYREF
:
{
{
struct
__tagBRECORD
*
pBr
=
&
V_UNION
(
pVarg
,
brecVal
);
IRecordInfo
*
rec_info
=
V_RECORDINFO
(
pVarg
);
if
(
pBr
->
pRecI
nfo
)
if
(
rec_i
nfo
)
{
{
IRecordInfo_RecordClear
(
pBr
->
pRecInfo
,
pBr
->
pvRecord
);
IRecordInfo_RecordClear
(
rec_info
,
V_RECORD
(
pVarg
)
);
IRecordInfo_Release
(
pBr
->
pRecI
nfo
);
IRecordInfo_Release
(
rec_i
nfo
);
}
}
break
;
break
;
}
}
...
@@ -645,11 +645,11 @@ HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG* pVarg)
...
@@ -645,11 +645,11 @@ HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG* pVarg)
}
}
else
if
(
V_VT
(
pVarg
)
==
VT_RECORD
)
else
if
(
V_VT
(
pVarg
)
==
VT_RECORD
)
{
{
struct
__tagBRECORD
*
pBr
=
&
V_UNION
(
pVarg
,
brecVal
);
IRecordInfo
*
rec_info
=
V_RECORDINFO
(
pVarg
);
if
(
pBr
->
pRecI
nfo
)
if
(
rec_i
nfo
)
{
{
IRecordInfo_RecordClear
(
pBr
->
pRecInfo
,
pBr
->
pvRecord
);
IRecordInfo_RecordClear
(
rec_info
,
V_RECORD
(
pVarg
)
);
IRecordInfo_Release
(
pBr
->
pRecI
nfo
);
IRecordInfo_Release
(
rec_i
nfo
);
}
}
}
}
else
if
(
V_VT
(
pVarg
)
==
VT_DISPATCH
||
else
if
(
V_VT
(
pVarg
)
==
VT_DISPATCH
||
...
@@ -669,31 +669,28 @@ HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG* pVarg)
...
@@ -669,31 +669,28 @@ HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG* pVarg)
*/
*/
static
HRESULT
VARIANT_CopyIRecordInfo
(
VARIANT
*
dest
,
const
VARIANT
*
src
)
static
HRESULT
VARIANT_CopyIRecordInfo
(
VARIANT
*
dest
,
const
VARIANT
*
src
)
{
{
struct
__tagBRECORD
*
dest_rec
=
&
V_UNION
(
dest
,
brecVal
);
IRecordInfo
*
src_info
=
V_RECORDINFO
(
src
);
const
struct
__tagBRECORD
*
src_rec
=
&
V_UNION
(
src
,
brecVal
);
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
ULONG
size
;
ULONG
size
;
if
(
!
src_
rec
->
pRecI
nfo
)
if
(
!
src_
i
nfo
)
{
{
if
(
src_rec
->
pvRecord
)
return
E_INVALIDARG
;
if
(
V_RECORD
(
src
)
)
return
E_INVALIDARG
;
return
S_OK
;
return
S_OK
;
}
}
hr
=
IRecordInfo_GetSize
(
src_
rec
->
pRecI
nfo
,
&
size
);
hr
=
IRecordInfo_GetSize
(
src_
i
nfo
,
&
size
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
FAILED
(
hr
))
return
hr
;
/* Windows does not use RecordCreate() here, memory should be allocated in compatible way so RecordDestroy()
/* Windows does not use RecordCreate() here, memory should be allocated in compatible way so RecordDestroy()
could free it later. */
could free it later. */
dest_rec
->
pvRecord
=
CoTaskMemAlloc
(
size
);
V_RECORD
(
dest
)
=
CoTaskMemAlloc
(
size
);
if
(
!
dest_rec
->
pvRecord
)
return
E_OUTOFMEMORY
;
if
(
!
V_RECORD
(
dest
)
)
return
E_OUTOFMEMORY
;
if
(
size
)
if
(
size
)
memset
(
dest_rec
->
pvRecord
,
0
,
size
);
memset
(
V_RECORD
(
dest
)
,
0
,
size
);
dest_rec
->
pRecInfo
=
src_rec
->
pRecInfo
;
IRecordInfo_AddRef
(
V_RECORDINFO
(
dest
)
=
src_info
);
IRecordInfo_AddRef
(
src_rec
->
pRecInfo
);
return
IRecordInfo_RecordCopy
(
src_info
,
V_RECORD
(
src
),
V_RECORD
(
dest
));
return
IRecordInfo_RecordCopy
(
src_rec
->
pRecInfo
,
src_rec
->
pvRecord
,
dest_rec
->
pvRecord
);
}
}
/******************************************************************************
/******************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment