]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: tree-wide: replace most DECLARE_POOL with DECLARE_TYPED_POOL
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Aug 2025 14:43:27 +0000 (16:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Aug 2025 17:55:30 +0000 (19:55 +0200)
commitc264ea1679f4ad6d4656249e3a5958334b10fbc6
tree3bea0dbbfe89c3759bbf634c600b754448df86fe
parent977feb561781e080963d4b31921450010a48351d
MEDIUM: tree-wide: replace most DECLARE_POOL with DECLARE_TYPED_POOL

This will make the pools size and alignment automatically inherit
the type declaration. It was done like this:

   sed -i -e 's:DECLARE_POOL(\([^,]*,[^,]*,\s*\)sizeof(\([^)]*\))):DECLARE_TYPED_POOL(\1\2):g' $(git grep -lw DECLARE_POOL src addons)
   sed -i -e 's:DECLARE_STATIC_POOL(\([^,]*,[^,]*,\s*\)sizeof(\([^)]*\))):DECLARE_STATIC_TYPED_POOL(\1\2):g' $(git grep -lw DECLARE_STATIC_POOL src addons)

81 replacements were made. The only remaining ones are those which set
their own size without depending on a structure. The few ones with an
extra size were manually handled.

It also means that the requested alignments are now checked against the
type's. Given that none is specified for now, no issue is reported.

It was verified with "show pools detailed" that the definitions are
exactly the same, and that the binaries are similar.
43 files changed:
addons/promex/service-prometheus.c
src/applet.c
src/cache.c
src/compression.c
src/connection.c
src/dns.c
src/event_hdl.c
src/fcgi-app.c
src/filters.c
src/flt_bwlim.c
src/flt_http_comp.c
src/flt_spoe.c
src/h3.c
src/hlua.c
src/hlua_fcn.c
src/http_ana.c
src/lb_fwlc.c
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mux_pt.c
src/mux_quic.c
src/mux_spop.c
src/pipe.c
src/queue.c
src/quic_ack.c
src/quic_conn.c
src/quic_frame.c
src/quic_rx.c
src/quic_ssl.c
src/quic_stream.c
src/quic_tls.c
src/quic_tx.c
src/resolvers.c
src/session.c
src/signal.c
src/ssl_sock.c
src/stconn.c
src/stream.c
src/task.c
src/tcpcheck.c
src/vars.c
src/xprt_handshake.c