From: Ondrej Zajicek Date: Sun, 11 May 2025 00:00:04 +0000 (+0200) Subject: Merge branch 'master' into thread-next X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Foz-test3;p=thirdparty%2Fbird.git Merge branch 'master' into thread-next --- 83dd392887f817892080d618171763aea913976f diff --cc conf/confbase.Y index 86ae099c9,c7649c3e7..ee32a0ce9 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@@ -54,6 -51,31 +54,31 @@@ static inline void cf_assert_symbol(con } } + static inline const char * -cf_type_name(enum f_type type) ++cf_type_name(btype type) + { + /* There is already f_type_name(), but this uses names more suited + to configuration error messages */ + switch (type) + { + case T_INT: return "Number"; + case T_BOOL: return "Boolean"; + case T_IP: return "IP address"; + case T_NET: return "Network"; + case T_STRING: return "String"; + case T_BYTESTRING: return "Bytestring"; + default: return "???"; + } + } + + static inline void -cf_assert_type(const struct f_val val, enum f_type type) ++cf_assert_type(const struct f_val val, btype type) + { + if (val.type != type) + cf_error("%s expected", cf_type_name(type)); + } + + CF_DECLS %union { @@@ -122,12 -142,12 +147,13 @@@ %type ipa_scope %type expr bool pxlen4 + %type idval %type