Skip to content

Commit f8974e9

Browse files
committed
libyang REFACTOR comments
1 parent 2481763 commit f8974e9

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

src/context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ LIBYANG_API_DECL void ly_ctx_set_module_imp_clb(struct ly_ctx *ctx, ly_module_im
461461
*
462462
* @param[in] ext Compiled extension instance.
463463
* @param[in] parent Data parent node instance of a schema node with @p ext instance. In special cases
464-
* (when not working with data) it be NULL!
464+
* (when not working with data) it can be NULL!
465465
* @param[in] user_data User-supplied callback data.
466466
* @param[out] ext_data Provided extension instance data.
467467
* @param[out] ext_data_free Whether the extension instance should free @p ext_data or not.

src/plugins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ struct lyplg_record {
129129
#ifndef STATIC
130130
static struct ly_set plugins_handlers;
131131
#endif
132+
133+
/* global sets of loaded plugins */
132134
struct ly_set ly_plugins_types;
133135
struct ly_set ly_plugins_extensions;
134136

src/tree_schema.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ struct lysc_must {
12781278
struct lysc_type {
12791279
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
12801280
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1281-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1281+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
12821282
LY_DATA_TYPE basetype; /**< base type of the type */
12831283
uint32_t refcount; /**< reference counter for type sharing, it may be accessed concurrently when
12841284
creating/freeing data node values that reference it (instance-identifier) */
@@ -1287,7 +1287,7 @@ struct lysc_type {
12871287
struct lysc_type_num {
12881288
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
12891289
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1290-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1290+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
12911291
LY_DATA_TYPE basetype; /**< base type of the type */
12921292
uint32_t refcount; /**< reference counter for type sharing */
12931293

@@ -1297,7 +1297,7 @@ struct lysc_type_num {
12971297
struct lysc_type_dec {
12981298
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
12991299
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1300-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1300+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
13011301
LY_DATA_TYPE basetype; /**< base type of the type */
13021302
uint32_t refcount; /**< reference counter for type sharing */
13031303

@@ -1308,7 +1308,7 @@ struct lysc_type_dec {
13081308
struct lysc_type_str {
13091309
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
13101310
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1311-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1311+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
13121312
LY_DATA_TYPE basetype; /**< base type of the type */
13131313
uint32_t refcount; /**< reference counter for type sharing */
13141314

@@ -1333,7 +1333,7 @@ struct lysc_type_bitenum_item {
13331333
struct lysc_type_enum {
13341334
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
13351335
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1336-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1336+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
13371337
LY_DATA_TYPE basetype; /**< base type of the type */
13381338
uint32_t refcount; /**< reference counter for type sharing */
13391339

@@ -1343,7 +1343,7 @@ struct lysc_type_enum {
13431343
struct lysc_type_bits {
13441344
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
13451345
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1346-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1346+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
13471347
LY_DATA_TYPE basetype; /**< base type of the type */
13481348
uint32_t refcount; /**< reference counter for type sharing */
13491349

@@ -1354,7 +1354,7 @@ struct lysc_type_bits {
13541354
struct lysc_type_leafref {
13551355
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
13561356
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1357-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1357+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
13581358
LY_DATA_TYPE basetype; /**< base type of the type */
13591359
uint32_t refcount; /**< reference counter for type sharing */
13601360

@@ -1367,7 +1367,7 @@ struct lysc_type_leafref {
13671367
struct lysc_type_identityref {
13681368
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
13691369
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1370-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1370+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
13711371
LY_DATA_TYPE basetype; /**< base type of the type */
13721372
uint32_t refcount; /**< reference counter for type sharing */
13731373

@@ -1378,7 +1378,7 @@ struct lysc_type_identityref {
13781378
struct lysc_type_instanceid {
13791379
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
13801380
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1381-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1381+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
13821382
LY_DATA_TYPE basetype; /**< base type of the type */
13831383
uint32_t refcount; /**< reference counter for type sharing */
13841384

@@ -1388,7 +1388,7 @@ struct lysc_type_instanceid {
13881388
struct lysc_type_union {
13891389
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
13901390
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1391-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1391+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
13921392
LY_DATA_TYPE basetype; /**< base type of the type */
13931393
uint32_t refcount; /**< reference counter for type sharing */
13941394

@@ -1398,7 +1398,7 @@ struct lysc_type_union {
13981398
struct lysc_type_bin {
13991399
const char *name; /**< referenced typedef name (without prefix, if any), NULL for built-in types */
14001400
struct lysc_ext_instance *exts; /**< list of the extension instances ([sized array](@ref sizedarrays)) */
1401-
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_ext_plugin() to get the plugin */
1401+
uintptr_t plugin_ref; /**< reference to type plugin, use ::lysc_get_type_plugin() to get the plugin */
14021402
LY_DATA_TYPE basetype; /**< base type of the type */
14031403
uint32_t refcount; /**< reference counter for type sharing */
14041404

src/tree_schema_internal.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,10 @@ struct lysp_yin_ctx {
185185
* @brief Internal pattern hash table record.
186186
*/
187187
struct ly_pattern_ht_rec {
188-
const char *pattern; /**< Pattern string, used both as key and for comparison. */
189-
uint8_t *serialized_pattern; /**< Serialized pattern code for this pattern,
190-
can be deserialized to pcre2_code that can be used directly. */
188+
const char *pattern; /**< Pattern string, used both as key to hash and value to search for. */
189+
uint8_t *serialized_pattern; /**< Serialized pattern code for this pattern.
190+
Can be deserialized to a compiled pcre2_code that can be used directly,
191+
see ::ly_pcode_deserialize(). */
191192
};
192193

193194
/**

tools/lint/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const struct lysc_node *find_schema_path(const struct ly_ctx *ctx, const char *s
122122
* @brief General callback providing run-time extension instance data.
123123
*
124124
* @param[in] ext Compiled extension instance.
125-
* @param[in] parent Data aprent, unused.
125+
* @param[in] parent Data parent, unused.
126126
* @param[in] user_data User-supplied callback data.
127127
* @param[out] ext_data Provided extension instance data.
128128
* @param[out] ext_data_free Whether the extension instance should free @p ext_data or not.

0 commit comments

Comments
 (0)