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
69f571db
Commit
69f571db
authored
Aug 15, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rbtree.h: Get rid of no longer needed wine_rb_stack.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e3a19d3b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
44 deletions
+1
-44
rbtree.h
include/wine/rbtree.h
+1
-44
No files found.
include/wine/rbtree.h
View file @
69f571db
...
...
@@ -3,6 +3,7 @@
*
* Copyright 2009 Henri Verbeet
* Copyright 2009 Andrew Riedi
* Copyright 2016 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -33,13 +34,6 @@ struct wine_rb_entry
unsigned
int
flags
;
};
struct
wine_rb_stack
{
struct
wine_rb_entry
***
entries
;
size_t
count
;
size_t
size
;
};
struct
wine_rb_functions
{
void
*
(
*
alloc
)(
size_t
size
);
...
...
@@ -52,42 +46,11 @@ struct wine_rb_tree
{
const
struct
wine_rb_functions
*
functions
;
struct
wine_rb_entry
*
root
;
struct
wine_rb_stack
stack
;
};
typedef
void
(
wine_rb_traverse_func_t
)(
struct
wine_rb_entry
*
entry
,
void
*
context
);
#define WINE_RB_FLAG_RED 0x1
#define WINE_RB_FLAG_STOP 0x2
static
inline
void
wine_rb_stack_clear
(
struct
wine_rb_stack
*
stack
)
{
stack
->
count
=
0
;
}
static
inline
void
wine_rb_stack_push
(
struct
wine_rb_stack
*
stack
,
struct
wine_rb_entry
**
entry
)
{
stack
->
entries
[
stack
->
count
++
]
=
entry
;
}
static
inline
int
wine_rb_ensure_stack_size
(
struct
wine_rb_tree
*
tree
,
size_t
size
)
{
struct
wine_rb_stack
*
stack
=
&
tree
->
stack
;
if
(
size
>
stack
->
size
)
{
size_t
new_size
=
stack
->
size
<<
1
;
struct
wine_rb_entry
***
new_entries
=
tree
->
functions
->
realloc
(
stack
->
entries
,
new_size
*
sizeof
(
*
stack
->
entries
));
if
(
!
new_entries
)
return
-
1
;
stack
->
entries
=
new_entries
;
stack
->
size
=
new_size
;
}
return
0
;
}
static
inline
int
wine_rb_is_red
(
struct
wine_rb_entry
*
entry
)
{
...
...
@@ -171,11 +134,6 @@ static inline int wine_rb_init(struct wine_rb_tree *tree, const struct wine_rb_f
tree
->
functions
=
functions
;
tree
->
root
=
NULL
;
tree
->
stack
.
entries
=
functions
->
alloc
(
16
*
sizeof
(
*
tree
->
stack
.
entries
));
if
(
!
tree
->
stack
.
entries
)
return
-
1
;
tree
->
stack
.
size
=
16
;
tree
->
stack
.
count
=
0
;
return
0
;
}
...
...
@@ -194,7 +152,6 @@ static inline void wine_rb_clear(struct wine_rb_tree *tree, wine_rb_traverse_fun
static
inline
void
wine_rb_destroy
(
struct
wine_rb_tree
*
tree
,
wine_rb_traverse_func_t
*
callback
,
void
*
context
)
{
wine_rb_clear
(
tree
,
callback
,
context
);
tree
->
functions
->
free
(
tree
->
stack
.
entries
);
}
static
inline
struct
wine_rb_entry
*
wine_rb_get
(
const
struct
wine_rb_tree
*
tree
,
const
void
*
key
)
...
...
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