On Thu Nov 6 17:21:53 2025 +0000, Jacek Caban wrote:
First of all, this is your change, so my question is: why do we now have to use `ARRAY_SIZE`? Historically, there was a large janitorial effort that introduced `ARRAY_SIZE` as a Wine extension and replaced many open-coded cases. My best guess as to why `ARRAYSIZE` (available in the Windows SDK) wasn’t used at the time is simply oversight and that’s where your usage stats come from. The latter was added later for MSVC compatibility, and both have been fine ever since, but if you’re proposing some kind of unification, I’m not in favor of enforcing the non-compatible variant.
I'm sorry but this has been merged without my approval, when I had explicitly requested changes to the code which I found ugly and inconsistent, by squeezing the change to a different MR which I wasn't assigned to. And now I have to spend time on it and justify the changes I had previously requested?
I don't really care which one between ARRAY_SIZE or ARRAYSIZE is better, I only see that ARRAY_SIZE is 10 times more widely used than the other, and I believe code should be kept consistent to avoid wasting our time on such considerations. The consistency is in favor of ARRAY_SIZE, period.
If you think that Wine should drop ARRAY_SIZE and use ARRAYSIZE everywhere, I'm fine with it, but it should be done at a large scale, not by introducing small diverging usages here and there. Like we did with ULONG types. In the meantime, please stick to ARRAY_SIZE.