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
905aa3cb
Commit
905aa3cb
authored
Jun 14, 2018
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp120: Fix function passed to _Concurrent_vector_base_v4::_Internal_clear.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c61a70be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
msvcp120.c
dlls/msvcp120/tests/msvcp120.c
+22
-8
No files found.
dlls/msvcp120/tests/msvcp120.c
View file @
905aa3cb
...
...
@@ -36,7 +36,7 @@ struct expect_struct {
DEFINE_EXPECT
(
queue_char__Copy_item
);
DEFINE_EXPECT
(
queue_char__Assign_and_destroy_item
);
DEFINE_EXPECT
(
concurrent_vector_int_alloc
);
DEFINE_EXPECT
(
concurrent_vector_int_
free
);
DEFINE_EXPECT
(
concurrent_vector_int_
destroy
);
};
#define SET_EXPECT(func) \
...
...
@@ -2454,10 +2454,10 @@ static void* __cdecl concurrent_vector_int_alloc(vector_base_v4 *this, size_t n)
return
malloc
(
n
*
sizeof
(
int
));
}
static
void
__cdecl
concurrent_vector_int_
free
(
void
*
ptr
,
size_t
n
)
static
void
__cdecl
concurrent_vector_int_
destroy
(
void
*
ptr
,
size_t
n
)
{
CHECK_EXPECT2
(
concurrent_vector_int_
free
);
free
(
ptr
);
CHECK_EXPECT2
(
concurrent_vector_int_
destroy
);
memset
(
ptr
,
0xff
,
sizeof
(
int
)
*
n
);
}
static
void
concurrent_vector_int_ctor
(
vector_base_v4
*
this
)
...
...
@@ -2467,6 +2467,20 @@ static void concurrent_vector_int_ctor(vector_base_v4 *this)
this
->
segment
=
&
this
->
storage
[
0
];
}
static
void
concurrent_vector_int_dtor
(
vector_base_v4
*
this
)
{
size_t
blocks
;
blocks
=
(
size_t
)
call_func2
(
p_vector_base_v4__Internal_clear
,
this
,
concurrent_vector_int_destroy
);
while
(
this
->
first_block
&&
blocks
>=
this
->
first_block
)
{
free
(
this
->
segment
[
blocks
-
this
->
first_block
]);
blocks
--
;
}
call_func1
(
p_vector_base_v4_dtor
,
this
);
}
static
void
test_queue_base_v4
(
void
)
{
queue_base_v4
queue
;
...
...
@@ -2731,16 +2745,16 @@ static void test_vector_base_v4(void)
size
=
(
size_t
)
call_func1
(
p_vector_base_v4__Internal_capacity
,
&
vector
);
ok
(
size
==
8
,
"size of vector got %ld expected 8
\n
"
,
(
long
)
size
);
SET_EXPECT
(
concurrent_vector_int_
free
);
SET_EXPECT
(
concurrent_vector_int_
destroy
);
size
=
(
size_t
)
call_func2
(
p_vector_base_v4__Internal_clear
,
&
vector
,
concurrent_vector_int_
free
);
CHECK_CALLED
(
concurrent_vector_int_
free
);
&
vector
,
concurrent_vector_int_
destroy
);
CHECK_CALLED
(
concurrent_vector_int_
destroy
);
ok
(
size
==
3
,
"_Internal_clear returned %ld
\n
"
,
(
long
)
size
);
ok
(
vector
.
first_block
==
1
,
"vector.first_block got %ld expected 1
\n
"
,
(
long
)
vector
.
first_block
);
ok
(
vector
.
early_size
==
0
,
"vector.early_size got %ld expected 0
\n
"
,
(
long
)
vector
.
early_size
);
c
all_func1
(
p_vector_base_v4_dtor
,
&
vector
);
c
oncurrent_vector_int_dtor
(
&
vector
);
}
START_TEST
(
msvcp120
)
...
...
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