"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Move got_opentempfd out of got_repo_open
To:
gameoftrees@openbsd.org
Date:
Thu, 2 Jun 2022 18:26:02 +0200

Download raw body.

Thread
On Thu, Jun 02, 2022 at 10:14:17AM -0600, Tracey Emery wrote:
> Getting closer. Thoughts?

GOT_PACK_CACHE_SIZE_DOUBLE does not convey the array's purpose well.
Perhaps something like GOT_PACK_NUM_TEMPFILES would be more descriptive?

Adding a new header (include/got_pack_cache_sizes.h) seems unnecessary.
In fact, since the array is allocated in repository.c internally and its
size is determined by a compile-time constant, the caller probably doesn't
even care about the size of the array.
Could callers just pass the array back in, and could repository.c keep
track of the array size internally? It could still use a macro for the
constant, but this constant won't need to be in a public header.