Re: [PATCH 07/20] path: hide functions using `the_repository` by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 09, 2024 at 02:43:59PM -0500, Justin Tobler wrote:
> 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux