MCPcopy Index your code
hub / github.com/git/git / prio_queue_get

Function prio_queue_get

prio-queue.c:79–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void *prio_queue_get(struct prio_queue *queue)
80{
81 void *result;
82
83 if (!queue->nr)
84 return NULL;
85 if (!queue->compare)
86 return queue->array[--queue->nr].data; /* LIFO */
87
88 result = queue->array[0].data;
89 if (!--queue->nr)
90 return result;
91
92 queue->array[0] = queue->array[queue->nr];
93 sift_down_root(queue);
94 return result;
95}
96
97void *prio_queue_peek(struct prio_queue *queue)
98{

Callers 15

nonstale_queue_getFunction · 0.85
get_reachable_subsetFunction · 0.85
get_branch_base_for_tipFunction · 0.85
assign_blameFunction · 0.85
limit_listFunction · 0.85
explore_walk_stepFunction · 0.85
indegree_walk_stepFunction · 0.85
next_topo_commitFunction · 0.85
get_revision_1Function · 0.85
pop_most_recent_commitFunction · 0.85

Calls 1

sift_down_rootFunction · 0.85

Tested by 1

test_prio_queueFunction · 0.68