Re: [PATCH v3 4/4] progress.c: silence cgcc suggestion about internal linkage

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

 



Hi,

On Mon, 27 Apr 2020, Đoàn Trần Công Danh wrote:

> diff --git a/progress.h b/progress.h
> index 847338911f..f1913acf73 100644
> --- a/progress.h
> +++ b/progress.h
> @@ -3,6 +3,14 @@
>
>  struct progress;
>
> +#ifdef GIT_TEST_PROGRESS_ONLY
> +
> +extern int progress_testing;
> +extern uint64_t progress_test_ns;
> +void progress_test_force_update(void);
> +
> +#endif
> +
>  void display_throughput(struct progress *progress, uint64_t total);
>  void display_progress(struct progress *progress, uint64_t n);
>  struct progress *start_progress(const char *title, uint64_t total);

A slightly cleaner strategy would be to add a separate header file, say,
`progress-internal.h` or `internal/progress.h` to declare the variables
and the function.

I guess at some stage we really need to define a proper API of libgit.a.
Just because we refuse to declare such an API doesn't mean that people
don't use libgit.a in that way (e.g. cgit, cinnabar). We might just as
well face reality and split up `cache.h` and put the API part into header
files in a subdirectory `include/`.

Ciao,
Dscho

[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