Repository navigation
Macro to Simplify Array Length Calculation (Revived from PR #401) - #519
arturobernalg wants to merge 1 commit into
Conversation
|
This looks better - thanks for redoing it - but it should be AP_ARRAY_LEN() rather than just ARRAY_LEN() to avoid namespace conflicts. Hopefully you can change it with a sed command :) |
4206487 to
6631444
Compare
Agreed. I've implemented the changes and updated the committee message. |
|
Also thanks from my side! |
|
Can you make your fork writable by committers? I'd like to test a couple of additional changes to this. |
|
Sorry this fell off my radar. I'm going to refresh this against current trunk and re-check all the call sites. I'll also enable maintainer edits so you can make the additional changes you had in mind. |
Add AP_ARRAY_LEN() to ap_config.h and use it instead of sizeof(a) / sizeof((a)[0]) where a is a fixed-size array. Remove the local H2_ALEN() macros replaced by AP_ARRAY_LEN().
6631444 to
b083a53
Compare
This PR is based on PR #401, which proposed
adding the
ARRAY_LENmacro to improve code readability and maintainability. The originalPR was abandoned and had conflicts, so I have rebased it, resolved issues, and integrated
the changes.