Re: [PATCH 09/12] {builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE"
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Nov 18, 2022, 18:41 UTC
- Message-ID
- <Y3fRv4sQFCJ/qIic@nand.local>
- In-Reply-To
- <patch-09.12-5b69cfa17ad-20221118T112205Z-avarab@gmail.com>
On Fri, Nov 18, 2022 at 12:31:03PM +0100, Ævar Arnfjörð Bjarmason wrote:
> Split up the "USE_THE_INDEX_COMPATIBILITY_MACROS" into that setting > and a more narrow "USE_THE_INDEX_VARIABLE". In the case of these > built-ins we only need "the_index" variable, but not the compatibility > wrapper for functions we're not using.
OK. So the old "#define USE_THE_INDEX_COMPATIBILITY_MACROS" used to give you the "the_index" extern, as well as all of the helper macros.
But now, USE_THE_INDEX_VARIABLE gives you just "the_index", and USE_THE_INDEX_COMPATIBILITY_MACROS gives you that as well as the helper macros, but you only get the latter if USE_THE_INDEX_VARIABLE is unset.
Makes sense.
Thanks, Taylor