Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
647e3061
Commit
647e3061
authored
Aug 21, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove nghttp2_pq_increase_key
parent
a4156cde
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
44 deletions
+0
-44
lib/nghttp2_pq.c
lib/nghttp2_pq.c
+0
-5
lib/nghttp2_pq.h
lib/nghttp2_pq.h
+0
-6
tests/main.c
tests/main.c
+0
-1
tests/nghttp2_pq_test.c
tests/nghttp2_pq_test.c
+0
-31
tests/nghttp2_pq_test.h
tests/nghttp2_pq_test.h
+0
-1
No files found.
lib/nghttp2_pq.c
View file @
647e3061
...
...
@@ -180,8 +180,3 @@ int nghttp2_pq_each(nghttp2_pq *pq, nghttp2_pq_item_cb fun, void *arg) {
}
return
0
;
}
void
nghttp2_pq_increase_key
(
nghttp2_pq
*
pq
,
nghttp2_pq_entry
*
item
)
{
assert
(
pq
->
q
[
item
->
index
]
==
item
);
bubble_down
(
pq
,
item
->
index
);
}
lib/nghttp2_pq.h
View file @
647e3061
...
...
@@ -120,12 +120,6 @@ void nghttp2_pq_update(nghttp2_pq *pq, nghttp2_pq_item_cb fun, void *arg);
*/
int
nghttp2_pq_each
(
nghttp2_pq
*
pq
,
nghttp2_pq_item_cb
fun
,
void
*
arg
);
/*
* Performs "increase-key" operation against |item|, assuming |item|
* is in |pq|, and its key is already updated.
*/
void
nghttp2_pq_increase_key
(
nghttp2_pq
*
pq
,
nghttp2_pq_entry
*
item
);
/*
* Removes |item| from priority queue.
*/
...
...
tests/main.c
View file @
647e3061
...
...
@@ -68,7 +68,6 @@ int main(int argc _U_, char *argv[] _U_) {
if
(
!
CU_add_test
(
pSuite
,
"pq"
,
test_nghttp2_pq
)
||
!
CU_add_test
(
pSuite
,
"pq_update"
,
test_nghttp2_pq_update
)
||
!
CU_add_test
(
pSuite
,
"pq_remove"
,
test_nghttp2_pq_remove
)
||
!
CU_add_test
(
pSuite
,
"pq_increase_key"
,
test_nghttp2_pq_increase_key
)
||
!
CU_add_test
(
pSuite
,
"map"
,
test_nghttp2_map
)
||
!
CU_add_test
(
pSuite
,
"map_functional"
,
test_nghttp2_map_functional
)
||
!
CU_add_test
(
pSuite
,
"map_each_free"
,
test_nghttp2_map_each_free
)
||
...
...
tests/nghttp2_pq_test.c
View file @
647e3061
...
...
@@ -224,34 +224,3 @@ void test_nghttp2_pq_remove(void) {
nghttp2_pq_free
(
&
pq
);
}
void
test_nghttp2_pq_increase_key
(
void
)
{
nghttp2_pq
pq
;
node
nodes
[
10
];
int
ans_key1
[]
=
{
1
,
2
,
3
,
3
,
4
,
5
};
int
ans_val1
[]
=
{
1
,
2
,
0
,
3
,
4
,
5
};
int
ans_key2
[]
=
{
0
,
1
,
2
,
3
,
4
,
6
};
int
ans_val2
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
};
nghttp2_pq_init
(
&
pq
,
node_less
,
nghttp2_mem_default
());
push_nodes
(
&
pq
,
nodes
,
6
);
nodes
[
0
].
key
=
3
;
nghttp2_pq_increase_key
(
&
pq
,
&
nodes
[
0
].
ent
);
check_nodes
(
&
pq
,
6
,
ans_key1
,
ans_val1
);
nghttp2_pq_free
(
&
pq
);
nghttp2_pq_init
(
&
pq
,
node_less
,
nghttp2_mem_default
());
push_nodes
(
&
pq
,
nodes
,
6
);
nodes
[
5
].
key
=
6
;
nghttp2_pq_increase_key
(
&
pq
,
&
nodes
[
5
].
ent
);
check_nodes
(
&
pq
,
6
,
ans_key2
,
ans_val2
);
nghttp2_pq_free
(
&
pq
);
}
tests/nghttp2_pq_test.h
View file @
647e3061
...
...
@@ -28,6 +28,5 @@
void
test_nghttp2_pq
(
void
);
void
test_nghttp2_pq_update
(
void
);
void
test_nghttp2_pq_remove
(
void
);
void
test_nghttp2_pq_increase_key
(
void
);
#endif
/* NGHTTP2_PQ_TEST_H */
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