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
7447145d
Commit
7447145d
authored
Aug 14, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Optimize bstr_from_xmlChar implementation.
parent
489c1a8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
20 deletions
+14
-20
msxml_private.h
dlls/msxml3/msxml_private.h
+14
-1
node.c
dlls/msxml3/node.c
+0
-19
No files found.
dlls/msxml3/msxml_private.h
View file @
7447145d
...
...
@@ -59,7 +59,6 @@ xmlNodePtr xmlNodePtr_from_domnode( IXMLDOMNode *iface, xmlElementType type );
/* helpers */
extern
xmlChar
*
xmlChar_from_wchar
(
LPWSTR
str
);
extern
BSTR
bstr_from_xmlChar
(
const
xmlChar
*
buf
);
extern
LONG
xmldoc_add_ref
(
xmlDocPtr
doc
);
extern
LONG
xmldoc_release
(
xmlDocPtr
doc
);
...
...
@@ -87,6 +86,20 @@ static inline xmlnode *impl_from_IXMLDOMNode( IXMLDOMNode *iface )
extern
HRESULT
DOMDocument_create_from_xmldoc
(
xmlDocPtr
xmldoc
,
IXMLDOMDocument2
**
document
);
static
inline
BSTR
bstr_from_xmlChar
(
const
xmlChar
*
str
)
{
BSTR
ret
=
NULL
;
if
(
str
)
{
DWORD
len
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
(
LPCSTR
)
str
,
-
1
,
NULL
,
0
);
ret
=
SysAllocStringLen
(
NULL
,
len
-
1
);
if
(
ret
)
MultiByteToWideChar
(
CP_UTF8
,
0
,
(
LPCSTR
)
str
,
-
1
,
ret
,
len
);
}
return
ret
;
}
#endif
void
*
libxslt_handle
;
...
...
dlls/msxml3/node.c
View file @
7447145d
...
...
@@ -247,25 +247,6 @@ static HRESULT WINAPI xmlnode_get_nodeName(
return
S_OK
;
}
BSTR
bstr_from_xmlChar
(
const
xmlChar
*
buf
)
{
DWORD
len
;
LPWSTR
str
;
BSTR
bstr
;
if
(
!
buf
)
return
NULL
;
len
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
(
LPCSTR
)
buf
,
-
1
,
NULL
,
0
);
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
str
)
return
NULL
;
MultiByteToWideChar
(
CP_UTF8
,
0
,
(
LPCSTR
)
buf
,
-
1
,
str
,
len
);
bstr
=
SysAllocString
(
str
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
return
bstr
;
}
static
HRESULT
WINAPI
xmlnode_get_nodeValue
(
IXMLDOMNode
*
iface
,
VARIANT
*
value
)
...
...
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