summaryrefslogtreecommitdiffstats
path: root/commit-slab-impl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* commit-slabs: move MAYBE_UNUSED outCarlo Marcelo Arenas Belón2018-10-241-2/+2
| | | | | | | | | after 36da893114 ("config.mak.dev: enable -Wunused-function", 2018-10-18) it is expected to be used to prevent -Wunused-function warnings for code that was macro generated Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* commit-slabs: remove realloc counter outside of slab structStefan Beller2018-06-291-3/+0
| | | | | | | | | | | | | The realloc counter is declared outside the struct for the given slabname, which makes it harder for a follow up patch to move the declaration of the struct around as then the counter variable would need special treatment. As the reallocation counter is currently unused we can just remove it. If we ever need to count the reallocations again, we can reintroduce the counter as part of 'struct slabname' in commit-slab-decl.h. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* commit-slab: support shared commit-slabNguyễn Thái Ngọc Duy2018-05-211-8/+14
| | | | | | | | define_shared_commit_slab() could be used in a header file to define a commit-slab. One of these C files must include commit-slab-impl.h and "call" implement_shared_commit_slab(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
* commit-slab.h: code splitNguyễn Thái Ngọc Duy2018-05-211-0/+91
The struct declaration and implementation macros are moved to commit-slab-hdr.h and commit-slab-impl.h respectively. This right now is not needed for current users but if we make a public commit-slab type, we may want to avoid including the slab implementation in a header file which gets replicated in every c file that includes it. Signed-off-by: Junio C Hamano <gitster@pobox.com>