Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
28f3128d
Commit
28f3128d
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: Use macros to access variant members.
parent
b6c5bae7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
usrmarshal.c
dlls/oleaut32/usrmarshal.c
+7
-7
No files found.
dlls/oleaut32/usrmarshal.c
View file @
28f3128d
...
...
@@ -399,11 +399,11 @@ unsigned char * WINAPI VARIANT_UserMarshal(ULONG *pFlags, unsigned char *Buffer,
header
->
clSize
=
0
;
/* fixed up at the end */
header
->
rpcReserved
=
0
;
header
->
vt
=
pvar
->
n1
.
n2
.
vt
;
header
->
vt
=
V_VT
(
pvar
)
;
header
->
wReserved1
=
pvar
->
n1
.
n2
.
wReserved1
;
header
->
wReserved2
=
pvar
->
n1
.
n2
.
wReserved2
;
header
->
wReserved3
=
pvar
->
n1
.
n2
.
wReserved3
;
header
->
switch_is
=
pvar
->
n1
.
n2
.
vt
;
header
->
switch_is
=
V_VT
(
pvar
)
;
if
(
header
->
switch_is
&
VT_ARRAY
)
header
->
switch_is
&=
~
VT_TYPEMASK
;
...
...
@@ -418,7 +418,7 @@ unsigned char * WINAPI VARIANT_UserMarshal(ULONG *pFlags, unsigned char *Buffer,
Pos
+=
4
;
if
((
header
->
vt
&
VT_TYPEMASK
)
!=
VT_VARIANT
)
{
memcpy
(
Pos
,
pvar
->
n1
.
n2
.
n3
.
byref
,
type_size
);
memcpy
(
Pos
,
V_BYREF
(
pvar
)
,
type_size
);
Pos
+=
type_size
;
}
else
...
...
@@ -432,7 +432,7 @@ unsigned char * WINAPI VARIANT_UserMarshal(ULONG *pFlags, unsigned char *Buffer,
if
((
header
->
vt
&
VT_TYPEMASK
)
==
VT_DECIMAL
)
memcpy
(
Pos
,
pvar
,
type_size
);
else
memcpy
(
Pos
,
&
pvar
->
n1
.
n2
.
n3
,
type_size
);
memcpy
(
Pos
,
&
V_UI8
(
pvar
)
,
type_size
);
Pos
+=
type_size
;
}
...
...
@@ -561,11 +561,11 @@ unsigned char * WINAPI VARIANT_UserUnmarshal(ULONG *pFlags, unsigned char *Buffe
else
if
((
header
->
vt
&
VT_TYPEMASK
)
==
VT_DECIMAL
)
memcpy
(
pvar
,
Pos
,
type_size
);
else
memcpy
(
&
pvar
->
n1
.
n2
.
n3
,
Pos
,
type_size
);
memcpy
(
&
V_UI8
(
pvar
)
,
Pos
,
type_size
);
Pos
+=
type_size
;
}
pvar
->
n1
.
n2
.
vt
=
header
->
vt
;
V_VT
(
pvar
)
=
header
->
vt
;
pvar
->
n1
.
n2
.
wReserved1
=
header
->
wReserved1
;
pvar
->
n1
.
n2
.
wReserved2
=
header
->
wReserved2
;
pvar
->
n1
.
n2
.
wReserved3
=
header
->
wReserved3
;
...
...
@@ -621,7 +621,7 @@ void WINAPI VARIANT_UserFree(ULONG *pFlags, VARIANT *pvar)
TRACE
(
"%#lx, %p.
\n
"
,
*
pFlags
,
pvar
);
TRACE
(
"vt=%04x
\n
"
,
V_VT
(
pvar
));
if
(
vt
&
VT_BYREF
)
ref
=
pvar
->
n1
.
n2
.
n3
.
byref
;
if
(
vt
&
VT_BYREF
)
ref
=
V_BYREF
(
pvar
)
;
VariantClear
(
pvar
);
if
(
!
ref
)
return
;
...
...
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