diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-07-30 13:20:30 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-07-30 13:20:30 -0700 |
| commit | de6dda0dc3d95cd9aaf43a7b85ceeb57316dcc27 (patch) | |
| tree | 8c970a139cd81136e71e6db49807b55878b6d54e /commit-slab.h | |
| parent | Git 2.28 (diff) | |
| parent | commit-graph: simplify write_commit_graph_file() #2 (diff) | |
| download | git-de6dda0dc3d95cd9aaf43a7b85ceeb57316dcc27.tar.gz git-de6dda0dc3d95cd9aaf43a7b85ceeb57316dcc27.zip | |
Merge branch 'sg/commit-graph-cleanups' into master
The changed-path Bloom filter is improved using ideas from an
independent implementation.
* sg/commit-graph-cleanups:
commit-graph: simplify write_commit_graph_file() #2
commit-graph: simplify write_commit_graph_file() #1
commit-graph: simplify parse_commit_graph() #2
commit-graph: simplify parse_commit_graph() #1
commit-graph: clean up #includes
diff.h: drop diff_tree_oid() & friends' return value
commit-slab: add a function to deep free entries on the slab
commit-graph-format.txt: all multi-byte numbers are in network byte order
commit-graph: fix parsing the Chunk Lookup table
tree-walk.c: don't match submodule entries for 'submod/anything'
Diffstat (limited to 'commit-slab.h')
| -rw-r--r-- | commit-slab.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/commit-slab.h b/commit-slab.h index 05b3f2804e..8e72a30536 100644 --- a/commit-slab.h +++ b/commit-slab.h @@ -47,6 +47,16 @@ * * Call this function before the slab falls out of scope to avoid * leaking memory. + * + * - void deep_clear_indegree(struct indegree *, void (*free_fn)(int*)) + * + * Empties the slab, similar to clear_indegree(), but in addition it + * calls the given 'free_fn' for each slab entry to release any + * additional memory that might be owned by the entry (but not the + * entry itself!). + * Note that 'free_fn' might be called even for entries for which no + * indegree_at() call has been made; in this case 'free_fn' is invoked + * with a pointer to a zero-initialized location. */ #define define_commit_slab(slabname, elemtype) \ |
