]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
json: also add explicit dispatchers for 'int' and 'unsigned'
authorLennart Poettering <lennart@poettering.net>
Mon, 17 Aug 2020 06:53:05 +0000 (08:53 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 26 Aug 2020 14:47:32 +0000 (16:47 +0200)
src/shared/json.h

index 5fe363f507ec7414437d80e26b0cad5f38394089..1d6fec67b69a36400e504fcc4b8f3e2b2e639e81 100644 (file)
@@ -304,6 +304,12 @@ assert_cc(sizeof(uintmax_t) == sizeof(uint64_t));
 assert_cc(sizeof(intmax_t) == sizeof(int64_t));
 #define json_dispatch_int64 json_dispatch_integer
 
+assert_cc(sizeof(uint32_t) == sizeof(unsigned));
+#define json_dispatch_uint json_dispatch_uint32
+
+assert_cc(sizeof(int32_t) == sizeof(int));
+#define json_dispatch_int json_dispatch_int32
+
 static inline int json_dispatch_level(JsonDispatchFlags flags) {
 
         /* Did the user request no logging? If so, then never log higher than LOG_DEBUG. Also, if this is marked as