Message ID | pull.1690.git.1710664071.gitgitgadget@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | utf8: change return type of some helpers from int to size_t | expand |
"Mohit Marathe via GitGitGadget" <gitgitgadget@gmail.com> writes: > There are lot of places in the codebase where int is used to store size of > an object instead of size_t (which is better alternative due to reasons like > portability, readability, etc). This patch series accomplishes one such > #TODO comment, which addresses this issue. Nice. In principle this is the right thing to do. To reviewers, if I were reviewing this series (which I will not in the next 24 hours), I'd pay particular attention to the callers that currently accept "int" and use negative return value as an sign of a failure. Moving to "size_t" from "int" will break such callers. Thanks.
On Sun, Mar 17, 2024 at 08:27:49AM +0000, Mohit Marathe via GitGitGadget wrote: > Hello, > > There are lot of places in the codebase where int is used to store size of > an object instead of size_t (which is better alternative due to reasons like > portability, readability, etc). This patch series accomplishes one such > #TODO comment, which addresses this issue. > > I appreciate your review and feedback on this patch series. I really appreciate you working on this -- our mismatch of types really irks me a ton, so I'm very happy to see some fixes. I've provided a bunch of feedback for your patch 1/2, where we need to be quite a bit more careful about the blast radius of each of the changes. I'd recommend to split that patch up into multiple parts. While each of the changes is basically only changing some types around, it's rather involved to review as you have to also investigate the vicinity of each change quite vigorously. So at the very least I would recommend to split out patches for every change that requires further changes, e.g. to the return types of additional functions. Thanks! Patrick