]> git.99rst.org Git - git.git/commit
prio-queue: rename .nr to .nr_ and add accessor helpers
authorKristofer Karlsson <redacted>
Mon, 8 Jun 2026 19:10:50 +0000 (19:10 +0000)
committerJunio C Hamano <redacted>
Tue, 9 Jun 2026 18:11:46 +0000 (11:11 -0700)
commit3c5783698854b56376b775af5053ae6fbe825cc0
tree3b12723853e88b79a3f197ff999bc168e06d8912
parent9ac3f193c05c2237e2b14ebaa1149e9fc8a1abe0
prio-queue: rename .nr to .nr_ and add accessor helpers

Rename the .nr member to .nr_ so that callers outside prio-queue.c
that directly reference .nr get a compilation error.  This catches
both existing misuse and future in-flight topics.

Add prio_queue_size() for callers that need to know the element count
and prio_queue_for_each() for callers that need to walk all elements.

Convert all external .nr users:
 - Loop conditions: use prio_queue_size(), prio_queue_get(), or
   prio_queue_peek() as the loop condition
 - Array iterations: use prio_queue_for_each()

Signed-off-by: Kristofer Karlsson <redacted>
Signed-off-by: Junio C Hamano <redacted>
14 files changed:
builtin/describe.c
builtin/last-modified.c
builtin/show-branch.c
commit-reach.c
fetch-pack.c
negotiator/default.c
negotiator/skipping.c
object-name.c
pack-bitmap-write.c
path-walk.c
prio-queue.c
prio-queue.h
revision.c
walker.c
git clone https://git.99rst.org/PROJECT