]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/json.h
json: add const string dispatcher
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Aug 2019 10:45:50 +0000 (12:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Dec 2019 08:47:00 +0000 (09:47 +0100)
commit19a209cc710a0368588d8541ed40ba8886599bd1
treedbb3aaff5d6c1cedb4ccec23501f9e1e908eed17
parente4defdc4b02f915a07b72571191b8415b4e4b828
json: add const string dispatcher

This adds json_dispatch_const_string() which is similar to
json_dispatch_string() but doesn't store a strdup()'ed copy of the
string, but a pointer directly into the JSON record.

This should simplify cases where the json variant sticks around long
enough anyway.
src/shared/json.c
src/shared/json.h