plugins CHANGE unify naming in plugins API
All the symbols connected with type plugins are now prefixed by
lyplg_type_ and symbols connected with extensions have lyplg_ext_
prefix.
diff --git a/src/plugins_exts_nacm.c b/src/plugins_exts_nacm.c
index ed670a8..f80d145 100644
--- a/src/plugins_exts_nacm.c
+++ b/src/plugins_exts_nacm.c
@@ -67,14 +67,14 @@
return LY_SUCCESS;
emem:
- lyext_log(arg->c_ext, LY_LLERR, LY_EMEM, NULL, "Memory allocation failed (%s()).", __func__);
+ lyplg_ext_log(arg->c_ext, LY_LLERR, LY_EMEM, NULL, "Memory allocation failed (%s()).", __func__);
return ret;
}
/**
* @brief Compile NAMC's extension instances.
*
- * Implementation of lyext_clb_compile callback set as lyext_plugin::compile.
+ * Implementation of ::lyplg_ext_compile_clb callback set as lyext_plugin::compile.
*/
static LY_ERR
nacm_compile(struct lysc_ctx *cctx, const struct lysp_ext_instance *p_ext, struct lysc_ext_instance *c_ext)
@@ -98,7 +98,7 @@
/* check that the extension is instantiated at an allowed place - data node */
if (!LY_STMT_IS_NODE(c_ext->parent_stmt)) {
- lyext_log(c_ext, LY_LLWRN, 0, lysc_ctx_get_path(cctx),
+ lyplg_ext_log(c_ext, LY_LLWRN, 0, lysc_ctx_get_path(cctx),
"Extension %s is allowed only in a data nodes, but it is placed in \"%s\" statement.",
p_ext->name, ly_stmt2str(c_ext->parent_stmt));
return LY_ENOT;
@@ -109,7 +109,7 @@
/* note LYS_AUGMENT and LYS_USES is not in the list since they are not present in the compiled tree. Instead, libyang
* passes all their extensions to their children nodes */
invalid_parent:
- lyext_log(c_ext, LY_LLWRN, 0, lysc_ctx_get_path(cctx),
+ lyplg_ext_log(c_ext, LY_LLWRN, 0, lysc_ctx_get_path(cctx),
"Extension %s is not allowed in %s statement.", p_ext->name, lys_nodetype2str(parent->nodetype));
return LY_ENOT;
}
@@ -125,10 +125,10 @@
* We check for all NACM plugins since we want to catch even the situation that there is default-deny-all
* AND default-deny-write */
if (parent->exts[u].def == c_ext->def) {
- lyext_log(c_ext, LY_LLERR, LY_EVALID, lysc_ctx_get_path(cctx),
+ lyplg_ext_log(c_ext, LY_LLERR, LY_EVALID, lysc_ctx_get_path(cctx),
"Extension %s is instantiated multiple times.", p_ext->name);
} else {
- lyext_log(c_ext, LY_LLERR, LY_EVALID, lysc_ctx_get_path(cctx),
+ lyplg_ext_log(c_ext, LY_LLERR, LY_EVALID, lysc_ctx_get_path(cctx),
"Extension nacm:default-deny-write is mixed with nacm:default-deny-all.");
}
return LY_EVALID;