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
7f96b7b1
Commit
7f96b7b1
authored
Mar 28, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
browseui/tests: Remove string conversion helper.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6b5a5c64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
autocomplete.c
dlls/browseui/tests/autocomplete.c
+9
-13
No files found.
dlls/browseui/tests/autocomplete.c
View file @
7f96b7b1
...
...
@@ -37,14 +37,6 @@
ok(FALSE, #exp " failed: %#lx\n", res); \
}
static
LPWSTR
strdup_AtoW
(
LPCSTR
str
)
{
int
size
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
LPWSTR
wstr
=
CoTaskMemAlloc
((
size
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
wstr
,
size
+
1
);
return
wstr
;
}
typedef
struct
{
IEnumString
IEnumString_iface
;
...
...
@@ -54,7 +46,7 @@ typedef struct
INT
expcount
;
INT
pos
;
INT
limit
;
const
char
**
data
;
const
WCHAR
**
data
;
}
TestACL
;
extern
IEnumStringVtbl
TestACLVtbl
;
...
...
@@ -70,7 +62,7 @@ static TestACL *impl_from_IACList(IACList *iface)
return
CONTAINING_RECORD
(
iface
,
TestACL
,
IACList_iface
);
}
static
TestACL
*
TestACL_Constructor
(
int
limit
,
const
char
**
strings
)
static
TestACL
*
TestACL_Constructor
(
int
limit
,
const
WCHAR
**
strings
)
{
TestACL
*
This
=
CoTaskMemAlloc
(
sizeof
(
TestACL
));
ZeroMemory
(
This
,
sizeof
(
*
This
));
...
...
@@ -127,6 +119,7 @@ static HRESULT STDMETHODCALLTYPE TestACL_QueryInterface(IEnumString *iface, REFI
static
HRESULT
STDMETHODCALLTYPE
TestACL_Next
(
IEnumString
*
iface
,
ULONG
celt
,
LPOLESTR
*
rgelt
,
ULONG
*
pceltFetched
)
{
TestACL
*
This
=
impl_from_IEnumString
(
iface
);
int
size
;
ULONG
i
;
trace
(
"ACL(%p): read %ld item(s)
\n
"
,
This
,
celt
);
...
...
@@ -134,7 +127,10 @@ static HRESULT STDMETHODCALLTYPE TestACL_Next(IEnumString *iface, ULONG celt, LP
{
if
(
This
->
pos
>=
This
->
limit
)
break
;
rgelt
[
i
]
=
strdup_AtoW
(
This
->
data
[
This
->
pos
]);
size
=
wcslen
(
This
->
data
[
This
->
pos
]);
rgelt
[
i
]
=
CoTaskMemAlloc
((
size
+
1
)
*
sizeof
(
WCHAR
));
wcscpy
(
rgelt
[
i
],
This
->
data
[
This
->
pos
]);
This
->
pos
++
;
}
...
...
@@ -222,8 +218,8 @@ IACListVtbl TestACL_ACListVtbl =
static
void
test_ACLMulti
(
void
)
{
const
char
*
strings1
[]
=
{
"a"
,
"c"
,
"e"
};
const
char
*
strings2
[]
=
{
"a"
,
"b"
,
"d"
};
const
WCHAR
*
strings1
[]
=
{
L"a"
,
L"c"
,
L"e"
};
const
WCHAR
*
strings2
[]
=
{
L"a"
,
L"b"
,
L"d"
};
const
WCHAR
exp
[]
=
L"ABC"
;
IEnumString
*
obj
;
IEnumACString
*
unk
;
...
...
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