Re: [PATCH 07/20] path: hide functions using `the_repository` by default
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 13, 2024, 09:25 UTC
- Message-ID
- <ZrsmkrbGYtfl2Mnc@tanuki>
- In-Reply-To
- <mc4omj4mi23fhmqp4xeafcluzf2iidp4uaf3h3gaxcalm3igvk@a7abzjynshfw>
On Fri, Aug 09, 2024 at 02:43:59PM -0500, Justin Tobler wrote:
Show 7 quoted lines
> On 24/08/07 08:57AM, Patrick Steinhardt wrote: > > +# ifdef USE_THE_REPOSITORY_VARIABLE > > +# include "strbuf.h" > > +# include "repository.h" > > Naive question, what is the purpose of providing the include statements > here? Wouldn't they always already be included?
Not necessarily, no. Most headers only have a forward declaration of `struct strbuf` and `struct repository`. For one this means that we cannot access the strbuf contents like we do in the function definitions in this header now. Second, it means that we cannot access `the_repository`.
Patrick