]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Minor] lua_upstream: pack acquired/retired into bitfields 6013/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 2 May 2026 10:46:40 +0000 (11:46 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 2 May 2026 10:46:40 +0000 (11:46 +0100)
commitc8c5a5d38eb1ff3fce8e397aa649221addf5e72d
tree63e5293da0ab008cc3e52961497d1deafd8debc7
parent2041f9e2b5449a22108689c0ec7d4df3c64a7db8
[Minor] lua_upstream: pack acquired/retired into bitfields

Two gboolean (gint) fields cost 8 padded bytes plus alignment per
wrapper. Each wrapper only needs two bits, so use unsigned:1
bitfields instead. struct rspamd_lua_upstream shrinks from 24 to
16 bytes on 64-bit targets.

No behaviour change.
src/lua/lua_common.h
src/lua/lua_upstream.c