Rework parsing symbols logic, so we get a cleaner file. Also, this allows us to use XML(libmxml)/JSON(libjannson) internal datatypes without fear. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx> --- 0 files changed diff --git a/src/internal.h b/src/internal.h index 5fef6d6..83cb4e8 100644 --- a/src/internal.h +++ b/src/internal.h @@ -40,6 +40,10 @@ struct nft_parse_err { #ifdef XML_PARSING #include <mxml.h> +#else +#define mxml_node_t void +#endif /* XML_PARSING */ + #define NFT_XML_MAND 0 #define NFT_XML_OPT (1 << 0) mxml_node_t *nft_mxml_build_tree(const char *xml, const char *treename, @@ -78,10 +82,13 @@ int nft_mxml_rule_parse(mxml_node_t *tree, struct nft_rule *r, struct nft_set; int nft_mxml_set_parse(mxml_node_t *tree, struct nft_set *s, struct nft_parse_err *err); -#endif #ifdef JSON_PARSING #include <jansson.h> +#else +#define json_t void +#define json_err_t void +#endif /* JSON_PARSING */ int nft_jansson_parse_val(json_t *root, const char *node_name, int type, void *out, struct nft_parse_err *err); @@ -119,7 +126,6 @@ int nft_jansson_parse_rule(struct nft_rule *r, json_t *tree, struct nft_set; int nft_jansson_parse_set(struct nft_set *s, json_t *tree, struct nft_parse_err *err); -#endif const char *nft_family2str(uint32_t family); int nft_str2family(const char *family); -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html