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
d4d92616
Commit
d4d92616
authored
Mar 01, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Don't make a variant copy if no need to for setting node value.
parent
c9563be5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
18 deletions
+30
-18
node.c
dlls/msxml3/node.c
+30
-18
No files found.
dlls/msxml3/node.c
View file @
d4d92616
...
...
@@ -282,36 +282,48 @@ static HRESULT node_set_content_escaped(xmlnode *This, LPCWSTR value)
HRESULT
node_put_value
(
xmlnode
*
This
,
VARIANT
*
value
)
{
VARIANT
string_value
;
HRESULT
hr
;
VariantInit
(
&
string_value
);
hr
=
VariantChangeType
(
&
string_value
,
value
,
0
,
VT_BSTR
);
if
(
FAILED
(
hr
))
{
WARN
(
"Couldn't convert to VT_BSTR
\n
"
);
return
hr
;
}
if
(
V_VT
(
value
)
!=
VT_BSTR
)
{
VARIANT
string_value
;
VariantInit
(
&
string_value
);
hr
=
VariantChangeType
(
&
string_value
,
value
,
0
,
VT_BSTR
);
if
(
FAILED
(
hr
))
{
WARN
(
"Couldn't convert to VT_BSTR
\n
"
);
return
hr
;
}
hr
=
node_set_content
(
This
,
V_BSTR
(
&
string_value
));
VariantClear
(
&
string_value
);
hr
=
node_set_content
(
This
,
V_BSTR
(
&
string_value
));
VariantClear
(
&
string_value
);
}
else
hr
=
node_set_content
(
This
,
V_BSTR
(
value
));
return
hr
;
}
HRESULT
node_put_value_escaped
(
xmlnode
*
This
,
VARIANT
*
value
)
{
VARIANT
string_value
;
HRESULT
hr
;
VariantInit
(
&
string_value
);
hr
=
VariantChangeType
(
&
string_value
,
value
,
0
,
VT_BSTR
);
if
(
FAILED
(
hr
))
{
WARN
(
"Couldn't convert to VT_BSTR
\n
"
);
return
hr
;
}
if
(
V_VT
(
value
)
!=
VT_BSTR
)
{
VARIANT
string_value
;
VariantInit
(
&
string_value
);
hr
=
VariantChangeType
(
&
string_value
,
value
,
0
,
VT_BSTR
);
if
(
FAILED
(
hr
))
{
WARN
(
"Couldn't convert to VT_BSTR
\n
"
);
return
hr
;
}
hr
=
node_set_content_escaped
(
This
,
V_BSTR
(
&
string_value
));
VariantClear
(
&
string_value
);
hr
=
node_set_content_escaped
(
This
,
V_BSTR
(
&
string_value
));
VariantClear
(
&
string_value
);
}
else
hr
=
node_set_content_escaped
(
This
,
V_BSTR
(
value
));
return
hr
;
}
...
...
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