libyang REFACTOR avoid connection between context and log location storage
libyang works strictly with a single context now, so it is not necessary
to connect the log location information with a specific context. It also
clarifies what to do when the context is not available in the function
but still a location information in an error message could be useful.
diff --git a/src/xml.c b/src/xml.c
index cf6810a..c4351bc 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -805,7 +805,7 @@
xmlctx->ctx = ctx;
xmlctx->in = in;
- LOG_LOCINIT(ctx, NULL, NULL, NULL, in);
+ LOG_LOCINIT(NULL, NULL, NULL, in);
/* parse next element, if any */
LY_CHECK_GOTO(ret = lyxml_next_element(xmlctx, &xmlctx->prefix, &xmlctx->prefix_len, &xmlctx->name,
@@ -1029,7 +1029,7 @@
return;
}
- LOG_LOCBACK(xmlctx->ctx, 0, 0, 0, 1);
+ LOG_LOCBACK(0, 0, 0, 1);
if (((xmlctx->status == LYXML_ELEM_CONTENT) || (xmlctx->status == LYXML_ATTR_CONTENT)) && xmlctx->dynamic) {
free((char *)xmlctx->value);