MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / Heap_offerx

Function Heap_offerx

src/util/heap.c:212–224  ·  view source on GitHub ↗

add item an error will occur if there isn't enough space for this item return 0 on success; -1 on error

Source from the content-addressed store, hash-verified

210// an error will occur if there isn't enough space for this item
211// return 0 on success; -1 on error
212int Heap_offerx
213(
214 heap_t *hp, // item The item to be added
215 void *item
216) {
217 if(hp->count == hp->size) {
218 return -1;
219 }
220
221 __Heap_offerx(hp, item);
222
223 return 0;
224}
225
226// remove the item with the top priority
227// return top item

Callers

nothing calls this directly

Calls 1

__Heap_offerxFunction · 0.85

Tested by

no test coverage detected