libyang REFACTOR rename LY_PREFIX_FORMAT values
Reflect that the value format is the primary concern of the enum, the prefix
interpretation is only based on the format.
diff --git a/src/parser_lyb.c b/src/parser_lyb.c
index 070c9c3..f588bd6 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -387,7 +387,7 @@
/* create metadata */
ret = lyd_parser_create_meta((struct lyd_ctx *)lybctx, NULL, meta, mod, meta_name, strlen(meta_name), meta_value,
- ly_strlen(meta_value), &dynamic, LY_PREF_JSON, NULL, LYD_HINT_DATA);
+ ly_strlen(meta_value), &dynamic, LY_VALUE_JSON, NULL, LYD_HINT_DATA);
/* free strings */
free(meta_name);
@@ -422,7 +422,7 @@
* @return LY_ERR value.
*/
static LY_ERR
-lyb_parse_prefix_data(struct lylyb_ctx *lybctx, LY_PREFIX_FORMAT format, void **prefix_data)
+lyb_parse_prefix_data(struct lylyb_ctx *lybctx, LY_VALUE_FORMAT format, void **prefix_data)
{
LY_ERR ret = LY_SUCCESS;
uint8_t count, i;
@@ -430,7 +430,7 @@
struct lyxml_ns *ns = NULL;
switch (format) {
- case LY_PREF_XML:
+ case LY_VALUE_XML:
/* read count */
lyb_read(&count, 1, lybctx);
if (!count) {
@@ -455,7 +455,7 @@
*prefix_data = set;
break;
- case LY_PREF_JSON:
+ case LY_VALUE_JSON:
/* nothing stored */
break;
default:
@@ -491,7 +491,7 @@
struct lyd_attr *attr2;
char *prefix = NULL, *module_name = NULL, *name = NULL, *value = NULL;
ly_bool dynamic = 0;
- LY_PREFIX_FORMAT format = 0;
+ LY_VALUE_FORMAT format = 0;
void *val_prefix_data = NULL;
/* read count */
@@ -723,7 +723,7 @@
char *value = NULL, *name = NULL, *prefix = NULL, *module_key = NULL;
const char *val_dict;
ly_bool dynamic = 0;
- LY_PREFIX_FORMAT format = 0;
+ LY_VALUE_FORMAT format = 0;
void *val_prefix_data = NULL;
uint32_t prev_lo, flags;
const struct ly_ctx *ctx = lybctx->lybctx->ctx;
@@ -805,7 +805,7 @@
dynamic = 1;
/* create node */
- ret = lyd_parser_create_term((struct lyd_ctx *)lybctx, snode, value, ly_strlen(value), &dynamic, LY_PREF_JSON,
+ ret = lyd_parser_create_term((struct lyd_ctx *)lybctx, snode, value, ly_strlen(value), &dynamic, LY_VALUE_JSON,
NULL, LYD_HINT_DATA, &node);
if (dynamic) {
free(value);