]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-json: add json_dispatch_const_path() helper
authorLennart Poettering <lennart@poettering.net>
Tue, 19 Nov 2024 13:59:00 +0000 (14:59 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 3 Jan 2025 15:38:56 +0000 (16:38 +0100)
commit3866e9ce9d34328460aee5ca01f6f1becfa200eb
treed0bc6b007d6246f5c3ae25340961be72267e6875
parentb0d0b08c62a2bfaae9b42ff02947c99a61fc7ab2
sd-json: add json_dispatch_const_path() helper

The new json_dispatch_const_path() is to json_dispatch_path() what
sd_json_dispatch_const_string() is to sd_json_dispatch_ string(), i.e.
doesn't implicitly strdup() the string, but gives you the pointer into
the JSON structure, and thus requires you to keep it pinned.
src/libsystemd/sd-json/json-util.c
src/libsystemd/sd-json/json-util.h