docs MAINTENANCE remove reference of the internal function
Do not reference internal function from a public API docs, add missing
description of the format-specific prefix data when used by internal
functions.
diff --git a/src/printer_lyb.c b/src/printer_lyb.c
index 14c4a0a..3b5b901 100644
--- a/src/printer_lyb.c
+++ b/src/printer_lyb.c
@@ -547,7 +547,11 @@
*
* @param[in] out Out structure.
* @param[in] format Value prefix format.
- * @param[in] prefix_data Prefix data to print.
+ * @param[in] prefix_data Format-specific data to print:
+ * LY_PREF_SCHEMA - const struct lysp_module * (module used for resolving prefixes from imports)
+ * LY_PREF_SCHEMA_RESOLVED - struct lyd_value_prefix * (sized array of pairs: prefix - module)
+ * LY_PREF_XML - const struct ly_set * (set with defined namespaces stored as ::lyxml_ns)
+ * LY_PREF_JSON - NULL
* @param[in] lybctx LYB context.
* @return LY_ERR value.
*/
diff --git a/src/printer_xml.c b/src/printer_xml.c
index 028456d..744f5be 100644
--- a/src/printer_xml.c
+++ b/src/printer_xml.c
@@ -127,6 +127,19 @@
return NULL;
}
+/**
+ * @brief Print prefix data.
+ *
+ * @param[in] ctx XML printer context.
+ * @param[in] format Value prefix format.
+ * @param[in] prefix_data Format-specific data to print:
+ * LY_PREF_SCHEMA - const struct lysp_module * (module used for resolving prefixes from imports)
+ * LY_PREF_SCHEMA_RESOLVED - struct lyd_value_prefix * (sized array of pairs: prefix - module)
+ * LY_PREF_XML - const struct ly_set * (set with defined namespaces stored as ::lyxml_ns)
+ * LY_PREF_JSON - NULL
+ * @param[in] prefix_opts Prefix options changing the meaning of parameters.
+ * @return LY_ERR value.
+ */
static void
xml_print_ns_prefix_data(struct xmlpr_ctx *ctx, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t prefix_opts)
{
diff --git a/src/tree_data.h b/src/tree_data.h
index 74180bc..92b449d 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -495,7 +495,7 @@
struct ly_opaq_name name; /**< attribute name with module information */
const char *value; /**< attribute value */
LY_PREFIX_FORMAT format; /**< format of the attribute and any prefixes, ::LY_PREF_XML or ::LY_PREF_JSON */
- void *val_prefix_data; /**< format-specific prefix data (see ::ly_resolve_prefix()) */
+ void *val_prefix_data; /**< format-specific prefix data */
uint32_t hints; /**< additional information about from the data source, see the [hints list](@ref lydhints) */
};
@@ -704,7 +704,7 @@
struct ly_opaq_name name; /**< node name with module information */
const char *value; /**< original value */
LY_PREFIX_FORMAT format; /**< format of the node and any prefixes, ::LY_PREF_XML or ::LY_PREF_JSON */
- void *val_prefix_data; /**< format-specific prefix data (see ::ly_resolve_prefix()) */
+ void *val_prefix_data; /**< format-specific prefix data */
uint32_t hints; /**< additional information about from the data source, see the [hints list](@ref lydhints) */
const struct ly_ctx *ctx; /**< libyang context */
diff --git a/src/tree_data_internal.h b/src/tree_data_internal.h
index 35a3839..5427621 100644
--- a/src/tree_data_internal.h
+++ b/src/tree_data_internal.h
@@ -186,7 +186,11 @@
* @param[in] value_len Length of @p value, must be set correctly.
* @param[in,out] dynamic Flag if @p value is dynamically allocated, is adjusted when @p value is consumed.
* @param[in] format Input format of @p value and @p ns.
- * @param[in] val_prefix_data Format-specific prefix data, param is spent (even in case the function fails).
+ * @param[in] val_prefix_data Format-specific prefix data, param is spent (even in case the function fails):
+ * LY_PREF_SCHEMA - const struct lysp_module * (module used for resolving prefixes from imports)
+ * LY_PREF_SCHEMA_RESOLVED - struct lyd_value_prefix * (sized array of pairs: prefix - module)
+ * LY_PREF_XML - const struct ly_set * (set with defined namespaces stored as ::lyxml_ns)
+ * LY_PREF_JSON - NULL
* @param[in] hints [Hints](@ref lydhints) from the parser regarding the node/value type.
* @param[out] node Created node.
* @return LY_SUCCESS on success.
@@ -432,7 +436,11 @@
* @brief Free stored prefix data.
*
* @param[in] format Format of the prefixes.
- * @param[in] prefix_data Prefix data to free.
+ * @param[in] prefix_data Format-specific data to free:
+ * LY_PREF_SCHEMA - const struct lysp_module * (module used for resolving prefixes from imports)
+ * LY_PREF_SCHEMA_RESOLVED - struct lyd_value_prefix * (sized array of pairs: prefix - module)
+ * LY_PREF_XML - const struct ly_set * (set with defined namespaces stored as ::lyxml_ns)
+ * LY_PREF_JSON - NULL
*/
void ly_free_prefix_data(LY_PREFIX_FORMAT format, void *prefix_data);