libyang FEATURE introduce and use new ly_bool type
To indicate simple flags or true/false return values, use a standalone
ly_bool type.
We do not use stdbool's bool type to avoid need to mimic all its
features on platforms that do not provide it. ly_bool is just a simple
rename for uint8_t and the reason to use it is only a better readability
of the meaning of the variables or function's return values.
diff --git a/src/context.c b/src/context.c
index 250c0e9..3769a0c 100644
--- a/src/context.c
+++ b/src/context.c
@@ -51,7 +51,7 @@
const char *name;
const char *revision;
const char *data;
- uint8_t implemented;
+ ly_bool implemented;
LYS_INFORMAT format;
} internal_modules[] = {
{"ietf-yang-metadata", "2016-08-05", (const char *)ietf_yang_metadata_2016_08_05_yang, 1, LYS_IN_YANG},
@@ -532,7 +532,7 @@
}
API const struct lysc_node *
-ly_ctx_get_node(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *data_path, uint8_t output)
+ly_ctx_get_node(const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *data_path, ly_bool output)
{
const struct lysc_node *snode = NULL;
struct lyxp_expr *exp = NULL;
@@ -621,7 +621,7 @@
}
static LY_ERR
-ylib_deviation(struct lyd_node *parent, const struct lys_module *cur_mod, uint8_t bis)
+ylib_deviation(struct lyd_node *parent, const struct lys_module *cur_mod, ly_bool bis)
{
LY_ARRAY_COUNT_TYPE i;
struct lys_module *mod;
@@ -646,7 +646,7 @@
}
static LY_ERR
-ylib_submodules(struct lyd_node *parent, const struct lys_module *cur_mod, uint8_t bis)
+ylib_submodules(struct lyd_node *parent, const struct lys_module *cur_mod, ly_bool bis)
{
LY_ERR ret;
LY_ARRAY_COUNT_TYPE i;
@@ -693,7 +693,7 @@
{
LY_ERR ret;
uint32_t i;
- uint8_t bis = 0;
+ ly_bool bis = 0;
int r;
char id[8], *str;
const struct lys_module *mod;