Revision 52604d71443315c82d3a5eb008d601daf8bad05b authored by Jeff King on 13 July 2014, 06:41:51 UTC, committed by Junio C Hamano on 28 July 2014, 17:14:33 UTC
Because the allocator functions for tree, blobs, etc are all
very similar, we originally used a macro to avoid repeating
ourselves. Since the prior commit, though, the heavy lifting
is done by an inline helper function.  The macro does still
save us a few lines, but at some readability cost.  It
obfuscates the function definitions (and makes them hard to
find via grep).

Much worse, though, is the fact that it isn't used
consistently for all allocators. Somebody coming later may
be tempted to modify DEFINE_ALLOCATOR, but they would miss
alloc_commit_node, which is treated specially.

Let's just drop the macro and write everything out
explicitly.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 8c3f3f2
History
File Mode Size
.gitignore -rw-r--r-- 7 bytes
README -rw-r--r-- 9.9 KB
TEAMS -rw-r--r-- 1.7 KB
bg.po -rw-r--r-- 322.5 KB
de.po -rw-r--r-- 321.6 KB
fr.po -rw-r--r-- 316.8 KB
git.pot -rw-r--r-- 198.7 KB
is.po -rw-r--r-- 3.1 KB
it.po -rw-r--r-- 128.2 KB
pt_PT.po -rw-r--r-- 99.8 KB
sv.po -rw-r--r-- 307.0 KB
vi.po -rw-r--r-- 343.9 KB
zh_CN.po -rw-r--r-- 299.2 KB

README

back to top