]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: buffers: keep b_getblk_nc() and b_peek_varint() in buf.h
authorWilly Tarreau <w@1wt.eu>
Fri, 18 Oct 2024 15:53:25 +0000 (17:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 18 Oct 2024 15:53:25 +0000 (17:53 +0200)
commit8b5a1fd1fcceaedc1104cd360def5ccf12f22a4e
treef89bd536e18701675163c4b471155a30ef4dcc93
parentf33e9079a93ce0a22954b9423657524e81d852e8
BUILD: buffers: keep b_getblk_nc() and b_peek_varint() in buf.h

Some large functions were moved to buf.c by commit ac66df4e2 ("REORG:
buffers: move some of the heavy functions from buf.h to buf.c"). However,
as found by Amaury, haring doesn't build anymore. Upon close inspection,
b_getblk_nc() isn't that big since it's very much inlinable, and a part
of its apparently large size comes from the BUG_ON_HOT() that were
implemented. Regarding b_peek_varint(), it doesn't have any dependency
and is used only at 4 places in the DNS code, so its loop will not have
big impacts, and the rest around can be optimised away by the compiler
so it remains relevant to keep it inlined. Also it can serve as a base
to deduplicate the code in b_get_varint().

No backport needed.
include/haproxy/buf.h
src/buf.c