]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: compiler: add FIXED_SIZE(size, type, name) macro
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 22 Oct 2025 17:23:02 +0000 (19:23 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Wed, 22 Oct 2025 18:52:12 +0000 (20:52 +0200)
commit466a603b59ed77e9787398ecf1baf77c46ae57b1
treed963c88b8ee54170b92e77a1b5f2540030a9879b
parent1e4dbebef2ce18a543c8e29de8a2200f71873b9e
MINOR: compiler: add FIXED_SIZE(size, type, name) macro

FIXED_SIZE() macro can be used to instruct the compiler that the struct
member named <name>, handled as <type>, must be stored using <size> bytes
and that even if the type used is actualler smaller than the expected size

FIXED_SIZE_ARRAY(), similar to FIXED_SIZE() but for arrays: it takes an
extra argument which is the number of members.

They may be used for portability concerns to ensure a structure mapping
remains consistent between platforms.
include/haproxy/compiler.h