Skip to content

Commit

Permalink
schema tree REFACTOR rename internal function
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko authored and rkrejci committed Apr 20, 2021
1 parent c1603ba commit 18a86e5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/context.c
Expand Up @@ -196,7 +196,7 @@ ly_ctx_load_module(struct ly_ctx *ctx, const char *name, const char *revision, c

LY_CHECK_ARG_RET(ctx, ctx, name, NULL);

LY_CHECK_GOTO(ret = lysp_load_module(ctx, name, revision, 1, features, &unres, &result), cleanup);
LY_CHECK_GOTO(ret = lys_load_module(ctx, name, revision, 1, features, &unres, &result), cleanup);

/* resolve unres and revert, if needed */
LY_CHECK_GOTO(ret = lys_compile_unres_glob(ctx, &unres), cleanup);
Expand Down
2 changes: 1 addition & 1 deletion src/schema_compile.c
Expand Up @@ -281,7 +281,7 @@ lys_compile_import(struct lysc_ctx *ctx, struct lysp_import *imp_p)
ly_in_free(in, 1);
}
if (!mod) {
if (lysp_load_module(ctx->ctx, imp_p->module->name, imp_p->module->revision, 0, NULL, ctx->unres,
if (lys_load_module(ctx->ctx, imp_p->module->name, imp_p->module->revision, 0, NULL, ctx->unres,
(struct lys_module **)&mod)) {
LOGERR(ctx->ctx, LY_ENOTFOUND, "Unable to reload \"%s\" module to import it into \"%s\", source data not found.",
imp_p->module->name, ctx->cur_mod->name);
Expand Down
2 changes: 1 addition & 1 deletion src/tree_schema.c
Expand Up @@ -873,7 +873,7 @@ lys_resolve_import_include(struct lys_parser_ctx *pctx, struct lysp_module *pmod
LY_ARRAY_FOR(pmod->imports, u) {
imp = &pmod->imports[u];
if (!imp->module) {
LY_CHECK_RET(lysp_load_module(PARSER_CTX(pctx), imp->name, imp->rev[0] ? imp->rev : NULL, 0, NULL,
LY_CHECK_RET(lys_load_module(PARSER_CTX(pctx), imp->name, imp->rev[0] ? imp->rev : NULL, 0, NULL,
pctx->unres, &imp->module));
}
/* check for importing the same module twice */
Expand Down
2 changes: 1 addition & 1 deletion src/tree_schema_helpers.c
Expand Up @@ -666,7 +666,7 @@ lys_module_localfile(struct ly_ctx *ctx, const char *name, const char *revision,
}

LY_ERR
lysp_load_module(struct ly_ctx *ctx, const char *name, const char *revision, ly_bool need_implemented,
lys_load_module(struct ly_ctx *ctx, const char *name, const char *revision, ly_bool need_implemented,
const char **features, struct lys_glob_unres *unres, struct lys_module **mod)
{
const char *module_data = NULL;
Expand Down
6 changes: 3 additions & 3 deletions src/tree_schema_internal.h
Expand Up @@ -284,7 +284,7 @@ LY_ERR lysp_type_find(const char *id, struct lysp_node *start_node, const struct
LY_ERR lysp_check_enum_name(struct lys_parser_ctx *ctx, const char *name, size_t name_len);

/**
* @brief Find and parse module of the given name.
* @brief Find and load a module of the given name.
*
* @param[in] ctx libyang context.
* @param[in] name Name of the module to load.
Expand All @@ -294,10 +294,10 @@ LY_ERR lysp_check_enum_name(struct lys_parser_ctx *ctx, const char *name, size_t
* case the module of the latest revision can not be made implemented.
* @param[in] features All the features to enable if implementing the module.
* @param[in] unres Global unres structure for all newly implemented modules.
* @param[out] mod Parsed module structure.
* @param[out] mod Created module structure.
* @return LY_ERR value.
*/
LY_ERR lysp_load_module(struct ly_ctx *ctx, const char *name, const char *revision, ly_bool need_implemented,
LY_ERR lys_load_module(struct ly_ctx *ctx, const char *name, const char *revision, ly_bool need_implemented,
const char **features, struct lys_glob_unres *unres, struct lys_module **mod);

/**
Expand Down

0 comments on commit 18a86e5

Please sign in to comment.