On 30/06/2022 13:03, Phillip Wood wrote:
On 30/06/2022 11:54, Ævar Arnfjörð Bjarmason wrote:
On Wed, Jun 29 2022, Phillip Wood via GitGitGadget wrote:
From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
Add a helper to grow an array. This is analogous to ALLOC_GROW() in
the rest of the codebase but returns −1 on allocation failure to
accommodate other users of libxdiff such as libgit2.
Urm, does it? I just skimmed this, so maybe I missed something, but I
don't see where you changed the definition of xdl_malloc(),
xdl_realloc() etc.
Oh I think I might have misunderstood your question. For git.git it will
still die() but for other users that arrange for xdl_realloc() to return
NULL on failure it will return -1. The same applies to the comments in
the previous two patches about XDL_[CM]ALLOC_ARRAY() returning NULL on
allocation failure.
Best Wishes
Phillip