libyang CHANGE add LY_VALUE_LYB
Add a separate value format of the LYB representation of the type.
Some of the callbacks API of the type plugins was modified to reflect the
need of passing generic (binary) data representation of the value.
diff --git a/src/tree_data_helpers.c b/src/tree_data_helpers.c
index 1d6c0f0..c317be2 100644
--- a/src/tree_data_helpers.c
+++ b/src/tree_data_helpers.c
@@ -451,6 +451,7 @@
case LY_VALUE_CANON:
case LY_VALUE_SCHEMA:
case LY_VALUE_JSON:
+ case LY_VALUE_LYB:
break;
}
}
@@ -508,6 +509,7 @@
break;
case LY_VALUE_CANON:
case LY_VALUE_JSON:
+ case LY_VALUE_LYB:
assert(!prefix_data);
*prefix_data_p = NULL;
break;
@@ -522,7 +524,7 @@
}
LY_ERR
-ly_store_prefix_data(const struct ly_ctx *ctx, const char *value, size_t value_len, LY_VALUE_FORMAT format,
+ly_store_prefix_data(const struct ly_ctx *ctx, const void *value, size_t value_len, LY_VALUE_FORMAT format,
const void *prefix_data, LY_VALUE_FORMAT *format_p, void **prefix_data_p)
{
LY_ERR ret = LY_SUCCESS;
@@ -612,6 +614,7 @@
case LY_VALUE_CANON:
case LY_VALUE_SCHEMA_RESOLVED:
case LY_VALUE_JSON:
+ case LY_VALUE_LYB:
if (!*prefix_data_p) {
/* new prefix data - simply copy all the prefix data */
*format_p = format;
@@ -642,6 +645,8 @@
return "XML prefixes";
case LY_VALUE_JSON:
return "JSON module names";
+ case LY_VALUE_LYB:
+ return "LYB prefixes";
default:
break;
}