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
ff09cb4f
Commit
ff09cb4f
authored
Mar 29, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/tests: Use CRT allocation functions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dbd4f9e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
23 deletions
+21
-23
reader.c
dlls/xmllite/tests/reader.c
+4
-5
writer.c
dlls/xmllite/tests/writer.c
+17
-18
No files found.
dlls/xmllite/tests/reader.c
View file @
ff09cb4f
...
...
@@ -30,7 +30,6 @@
#include "ole2.h"
#include "xmllite.h"
#include "wine/test.h"
#include "wine/heap.h"
DEFINE_GUID
(
IID_IXmlReaderInput
,
0x0b3ccc9b
,
0x9214
,
0x428b
,
0xa2
,
0xae
,
0xef
,
0x3a
,
0xa8
,
0x71
,
0xaf
,
0xda
);
...
...
@@ -383,12 +382,12 @@ static ULONG WINAPI testinput_AddRef(IUnknown *iface)
static
ULONG
WINAPI
testinput_Release
(
IUnknown
*
iface
)
{
testinput
*
This
=
impl_from_IUnknown
(
iface
);
testinput
*
input
=
impl_from_IUnknown
(
iface
);
LONG
ref
;
ref
=
InterlockedDecrement
(
&
This
->
ref
);
ref
=
InterlockedDecrement
(
&
input
->
ref
);
if
(
ref
==
0
)
heap_free
(
This
);
free
(
input
);
return
ref
;
}
...
...
@@ -404,7 +403,7 @@ static HRESULT testinput_createinstance(void **ppObj)
{
testinput
*
input
;
input
=
heap_
alloc
(
sizeof
(
*
input
));
input
=
m
alloc
(
sizeof
(
*
input
));
if
(
!
input
)
return
E_OUTOFMEMORY
;
input
->
IUnknown_iface
.
lpVtbl
=
&
testinput_vtbl
;
...
...
dlls/xmllite/tests/writer.c
View file @
ff09cb4f
...
...
@@ -27,7 +27,6 @@
#include "ole2.h"
#include "xmllite.h"
#include "wine/heap.h"
#include "wine/test.h"
#include "initguid.h"
...
...
@@ -100,7 +99,7 @@ static WCHAR *strdupAtoW(const char *str)
if
(
!
str
)
return
ret
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
ret
=
heap_
alloc
(
len
*
sizeof
(
WCHAR
));
ret
=
m
alloc
(
len
*
sizeof
(
WCHAR
));
if
(
ret
)
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
);
return
ret
;
...
...
@@ -843,9 +842,9 @@ static HRESULT write_start_element(IXmlWriter *writer, const char *prefix, const
hr
=
IXmlWriter_WriteStartElement
(
writer
,
prefixW
,
localW
,
uriW
);
heap_
free
(
prefixW
);
heap_
free
(
localW
);
heap_
free
(
uriW
);
free
(
prefixW
);
free
(
localW
);
free
(
uriW
);
return
hr
;
}
...
...
@@ -863,10 +862,10 @@ static HRESULT write_element_string(IXmlWriter *writer, const char *prefix, cons
hr
=
IXmlWriter_WriteElementString
(
writer
,
prefixW
,
localW
,
uriW
,
valueW
);
heap_
free
(
prefixW
);
heap_
free
(
localW
);
heap_
free
(
uriW
);
heap_
free
(
valueW
);
free
(
prefixW
);
free
(
localW
);
free
(
uriW
);
free
(
valueW
);
return
hr
;
}
...
...
@@ -880,7 +879,7 @@ static HRESULT write_string(IXmlWriter *writer, const char *str)
hr
=
IXmlWriter_WriteString
(
writer
,
strW
);
heap_
free
(
strW
);
free
(
strW
);
return
hr
;
}
...
...
@@ -1589,10 +1588,10 @@ static HRESULT write_attribute_string(IXmlWriter *writer, const char *prefix, co
hr
=
IXmlWriter_WriteAttributeString
(
writer
,
prefixW
,
localW
,
uriW
,
valueW
);
heap_
free
(
prefixW
);
heap_
free
(
localW
);
heap_
free
(
uriW
);
heap_
free
(
valueW
);
free
(
prefixW
);
free
(
localW
);
free
(
uriW
);
free
(
valueW
);
return
hr
;
}
...
...
@@ -2116,10 +2115,10 @@ static HRESULT write_doctype(IXmlWriter *writer, const char *name, const char *p
hr
=
IXmlWriter_WriteDocType
(
writer
,
nameW
,
pubidW
,
sysidW
,
subsetW
);
heap_
free
(
nameW
);
heap_
free
(
pubidW
);
heap_
free
(
sysidW
);
heap_
free
(
subsetW
);
free
(
nameW
);
free
(
pubidW
);
free
(
sysidW
);
free
(
subsetW
);
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