diff options
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2014-07-13 02:41:41 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-13 18:59:04 -0700 |
commit | 225ea22046a1193bd934a8ea308fa4a7788c9796 (patch) | |
tree | 0029d079de66eaf739962e2230536e10fe508c98 /archive.h | |
parent | Merge branch 'jk/commit-buffer-length' (diff) | |
download | tgif-225ea22046a1193bd934a8ea308fa4a7788c9796.tar.xz |
alloc.c: remove the alloc_raw_commit_node() function
In order to encapsulate the setting of the unique commit index, commit
969eba63 ("commit: push commit_index update into alloc_commit_node",
10-06-2014) introduced a (logically private) intermediary allocator
function. However, this function (alloc_raw_commit_node()) was declared
as a public function, which undermines its entire purpose.
Introduce an inline function, alloc_node(), which implements the main
logic of the allocator used by DEFINE_ALLOCATOR, and redefine the macro
in terms of the new function. In addition, use the new function in the
implementation of the alloc_commit_node() allocator, rather than the
intermediary allocator, which can now be removed.
Noticed by sparse ("symbol 'alloc_raw_commit_node' was not declared.
Should it be static?").
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive.h')
0 files changed, 0 insertions, 0 deletions