]> git.ipfire.org Git - thirdparty/systemd.git/commit
serialize: add serialize_bool_elide() helper 28557/head
authorLuca Boccassi <bluca@debian.org>
Mon, 26 Jun 2023 15:13:49 +0000 (16:13 +0100)
committerLuca Boccassi <bluca@debian.org>
Sat, 29 Jul 2023 10:25:05 +0000 (11:25 +0100)
commit942c40c64cf888f8d66621f8a9d47a1a2970d12f
tree11fdb72f720c517264d15a23f9ce852144210942
parent598d2428e158da1022d90a938d11084c989bed5b
serialize: add serialize_bool_elide() helper

In many case we serialize into objects that have been zero-initialized.
To save some time and resources when there are a lot of booleans, add a
helper that serializes only when the boolean is true.
src/shared/serialize.h
src/test/test-serialize.c