* @brief Allocated capacity of the underlying vector. * * Capacity ≥ size; the queue can absorb (capacity − size) more pushes * without re-allocating. * * @param pq Queue pointer. NULL returns 0. * @return Capacity in elements. */
| 414 | * without re-allocating. |
| 415 | * |
| 416 | * @param pq Queue pointer. NULL returns 0. |
| 417 | * @return Capacity in elements. |
| 418 | */ |
| 419 | size_t priority_queue_capacity(const PriorityQueue* pq) { |
| 420 | PQUEUE_LOG("[priority_queue_capacity]: enter pq=%p", (const void*)pq); |
| 421 | |
| 422 | if (!pq || !pq->vec) { |
| 423 | PQUEUE_LOG("[priority_queue_capacity]: NULL receiver -> 0"); |
| 424 | return 0; |
| 425 | } |
| 426 | size_t out = vector_capacity((Vector*)pq->vec); |
| 427 | PQUEUE_LOG("[priority_queue_capacity]: exit -> %zu", out); |
| 428 | |
| 429 | return out; |
| 430 | } |
nothing calls this directly
no test coverage detected