Skip to content

Commit 3af3da8

Browse files
committed
docs: clarify how extensions work
Fixes: fb60895 Allow getting module extensions Change-Id: I49a69608243c4ceb95736ed66c4ce891ba106815
1 parent de3fc82 commit 3af3da8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

include/libyang-cpp/Module.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class LIBYANG_CPP_EXPORT Identity {
156156
/**
157157
* @brief Contains information about compiled extension.
158158
*
159-
* Wraps `lysc_extension_instance`
159+
* Wraps `lysc_ext_instance`
160160
*/
161161
class LIBYANG_CPP_EXPORT ExtensionInstance {
162162
public:

src/Module.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,11 @@ ExtensionInstance::ExtensionInstance(const lysc_ext_instance* ext, std::shared_p
391391
}
392392

393393
/**
394-
* @brief Returns the argument
394+
* @brief Returns the argument name
395+
*
396+
* As an example, the RESTCONF RFC defines an extension named "yang-data".
397+
* This extension is then instantiated at two places by that RFC, under
398+
* names "yang-errors" and "yang-api".
395399
*
396400
* Wraps `lysc_ext_instance::argument`.
397401
*/
@@ -417,7 +421,7 @@ Extension::Extension(const lysc_ext* ext, std::shared_ptr<ly_ctx> ctx)
417421
}
418422

419423
/**
420-
* @brief Returns the name of the module.
424+
* @brief Returns the name of the extension definition
421425
*
422426
* Wraps `lysc_ext::name`.
423427
*/

0 commit comments

Comments
 (0)