From: Patrick Steinhardt Date: Mon, 08 Jun 2026 13:53:36 GMT Subject: Re: [PATCH 6/7] packfile,delta: drop the `cast_size_t_to_ulong()` wrappers Message-ID: In-Reply-To: <460d733feeaf2a94fe28d7509cc4128e9c0a7610.1780570273.git.gitgitgadget@gmail.com> On Thu, Jun 04, 2026 at 10:51:11AM +0000, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > When I started the transition from `unsigned long` to `size_t`, in the > interest of keeping the patches reviewable, I introduced these calls to > prevent data type narrowing from silently failing to handle large object > sizes. I also introduced `*_sz()` variants that would allow most of the > callers to keep using that `unsigned long` that the 90s kindly asked to > be returned. > > After the preceding commits, the only places that called the narrow > wrappers either no longer exist or already use the `_sz` form > internally, so the wrappers just narrow values back through > `cast_size_t_to_ulong()` for no reason. > > Drop them and rename the `_sz` variants back to the natural names. Aha, so you already address my comment I had on one of the preceding patches :) Patrick