json-util: add JSON_BUILD_PAIR_ENUM_NON_EMPTY macro

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ivan Kruglov
2026-05-18 00:33:52 -07:00
parent 2d4f2441f5
commit e4b5bdb9b3
+1
View File
@@ -268,6 +268,7 @@ enum {
#define JSON_BUILD_PAIR_PIDREF(name, p) SD_JSON_BUILD_PAIR(name, JSON_BUILD_PIDREF(p))
#define JSON_BUILD_PAIR_DEVNUM(name, d) SD_JSON_BUILD_PAIR(name, JSON_BUILD_DEVNUM(d))
#define JSON_BUILD_PAIR_ENUM(name, s) SD_JSON_BUILD_PAIR(name, JSON_BUILD_STRING_UNDERSCORIFY(s))
#define JSON_BUILD_PAIR_ENUM_NON_EMPTY(name, s) JSON_BUILD_PAIR_STRING_NON_EMPTY_UNDERSCORIFY(name, s)
#define JSON_BUILD_PAIR_YES_NO(name, b) SD_JSON_BUILD_PAIR(name, SD_JSON_BUILD_STRING(yes_no(b)))
#define JSON_BUILD_PAIR_CONDITION_UNSIGNED(condition, name, value) \