schema tree REFACTOR compatibility of lysp_module and lysp_submodule
Also, the main module can now be accessed directly.
diff --git a/src/common.h b/src/common.h
index 2002c96..b1ff0fe 100644
--- a/src/common.h
+++ b/src/common.h
@@ -234,13 +234,14 @@
* the compiled versions of the schemas are present, the submodule cannot be returned even if it was used to compile
* some of the currently present schemas.
*
- * @param[in] ctx Context where to search
- * @param[in] module Name of the module where the submodule is supposed to belongs-to. If NULL, the module name is not checked.
+ * @param[in] ctx Context where to search in case @p module is NULL.
+ * @param[in] module Submodule parent (belongs-to) module in case @p ctx is NULL.
* @param[in] submodule Name of the submodule to find.
* @param[in] revision Optional revision of the submodule to find. If not specified, the latest revision is returned.
* @return Pointer to the specified submodule if it is present in the context.
*/
-struct lysp_submodule *ly_ctx_get_submodule(const struct ly_ctx *ctx, const char *module, const char *submodule, const char *revision);
+struct lysp_submodule *ly_ctx_get_submodule(const struct ly_ctx *ctx, const struct lys_module *module,
+ const char *submodule, const char *revision);
/**
* @brief Get the (only) implemented YANG module specified by its name.