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/log.h b/src/log.h
index 00eb55c..8fcb424 100644
--- a/src/log.h
+++ b/src/log.h
@@ -25,6 +25,13 @@
struct ly_ctx;
/**
+ * @brief Type to indicate boolean value.
+ *
+ * Do not test for actual value. Instead, handle it as true/false value in condition.
+ */
+typedef uint8_t ly_bool;
+
+/**
* @defgroup log Logger
* @{
*
@@ -131,7 +138,7 @@
* presence) or it can be NULL, so consider it as an optional parameter. If the flag is 0, libyang will
* not bother with resolving the path.
*/
-void ly_set_log_clb(ly_log_clb clb, uint8_t path);
+void ly_set_log_clb(ly_log_clb clb, ly_bool path);
/**
* @brief Get logger callback.