Re: [PATCH 4/6] Allocate cached_refs objects dynamically
Michael Haggerty <mhagger@alum.mit.edu> writes:
Show 23 quoted lines
> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
> ---
> refs.c | 28 +++++++++++++++++++++-------
> 1 files changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/refs.c b/refs.c
> index e043555..102ed03 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -157,7 +157,7 @@ static struct cached_refs {
> char did_packed;
> struct ref_list *loose;
> struct ref_list *packed;
> -} cached_refs, submodule_refs;
> +} *cached_refs, *submodule_refs;
> static struct ref_list *current_ref;
>
> static struct ref_list *extra_refs;
> @@ -181,6 +181,15 @@ static void clear_cached_refs(struct cached_refs *ca)
> ca->did_loose = ca->did_packed = 0;
> }
>
> +struct cached_refs *create_cached_refs()struct cached_refs *create_cached_refs(void)