@@ -1764,7 +1764,7 @@ lys_new_type(const struct ly_ctx *ctx, LY_DATA_TYPE basetype, const char *tpdf_n
17641764 * @param[in] basetype Base YANG built-in type of the type to compile.
17651765 * @param[in] tpdfname Name of the type's typedef, serves as a flag - if it is leaf/leaf-list's type, it is NULL.
17661766 * @param[in] base Latest base (compiled) type from which the current type is being derived.
1767- * @param[in] plugin Type plugin to use.
1767+ * @param[in] plugin_ref Reference to the type plugin to use.
17681768 * @param[in] tpdf_chain Chain of the used typedefs, traversed backwards.
17691769 * @param[in] tpdf_chain_last Index of the last (backwards) typedef in @p tpdf_chain to use.
17701770 * @param[out] type Compiled type.
@@ -1773,7 +1773,7 @@ lys_new_type(const struct ly_ctx *ctx, LY_DATA_TYPE basetype, const char *tpdf_n
17731773static LY_ERR
17741774lys_compile_type_ (struct lysc_ctx * ctx , struct lysp_node * context_pnode , uint16_t context_flags , const char * context_name ,
17751775 const struct lysp_type * type_p , LY_DATA_TYPE basetype , const char * tpdfname , const struct lysc_type * base ,
1776- uintptr_t plugin , struct ly_set * tpdf_chain , uint32_t tpdf_chain_last , struct lysc_type * * type )
1776+ uintptr_t plugin_ref , struct ly_set * tpdf_chain , uint32_t tpdf_chain_last , struct lysc_type * * type )
17771777{
17781778 LY_ERR rc = LY_SUCCESS ;
17791779 struct lysc_type_bin * bin ;
@@ -1794,7 +1794,7 @@ lys_compile_type_(struct lysc_ctx *ctx, struct lysp_node *context_pnode, uint16_
17941794 LY_CHECK_GOTO (rc , cleanup );
17951795
17961796 (* type )-> basetype = basetype ;
1797- (* type )-> plugin = plugin ;
1797+ (* type )-> plugin = plugin_ref ;
17981798
17991799 switch (basetype ) {
18001800 case LY_TYPE_BINARY :
@@ -2141,7 +2141,7 @@ lys_compile_type(struct lysc_ctx *ctx, struct lysp_node *context_pnode, uint16_t
21412141 struct lysc_type_union * base_un ;
21422142 LY_ARRAY_COUNT_TYPE u ;
21432143 struct ly_set tpdf_chain = {0 };
2144- uintptr_t plugin_id = 0 ;
2144+ uintptr_t plugin_ref = 0 ;
21452145
21462146 * type = NULL ;
21472147 if (dflt ) {
@@ -2264,19 +2264,19 @@ lys_compile_type(struct lysc_ctx *ctx, struct lysp_node *context_pnode, uint16_t
22642264 }
22652265
22662266 /* try to find loaded user type plugins */
2267- plugin_id = lyplg_type_plugin_find (ctx -> ctx , tctx -> tpdf -> type .pmod -> mod -> name , tctx -> tpdf -> type .pmod -> mod -> revision ,
2267+ plugin_ref = lyplg_type_plugin_find (ctx -> ctx , tctx -> tpdf -> type .pmod -> mod -> name , tctx -> tpdf -> type .pmod -> mod -> revision ,
22682268 tctx -> tpdf -> name );
2269- if (!plugin_id && base ) {
2270- plugin_id = base -> plugin ;
2269+ if (!plugin_ref && base ) {
2270+ plugin_ref = base -> plugin ;
22712271 }
2272- if (!plugin_id ) {
2272+ if (!plugin_ref ) {
22732273 /* use the internal built-in type implementation */
2274- plugin_id = lyplg_type_plugin_find (ctx -> ctx , "" , NULL , ly_data_type2str [basetype ]);
2274+ plugin_ref = lyplg_type_plugin_find (ctx -> ctx , "" , NULL , ly_data_type2str [basetype ]);
22752275 }
2276- assert (plugin_id );
2276+ assert (plugin_ref );
22772277
22782278 if ((basetype != LY_TYPE_LEAFREF ) && (u != tpdf_chain .count - 1 ) && !tctx -> tpdf -> type .flags &&
2279- !tctx -> tpdf -> type .exts && (plugin_id == base -> plugin )) {
2279+ !tctx -> tpdf -> type .exts && (plugin_ref == base -> plugin )) {
22802280 /* no change, reuse the compiled base */
22812281 ((struct lysp_tpdf * )tctx -> tpdf )-> type .compiled = base ;
22822282 LY_ATOMIC_INC_BARRIER (base -> refcount );
@@ -2297,7 +2297,7 @@ lys_compile_type(struct lysc_ctx *ctx, struct lysp_node *context_pnode, uint16_t
22972297
22982298 /* compile the typedef type */
22992299 ret = lys_compile_type_ (ctx , tctx -> node , tctx -> tpdf -> flags , tctx -> tpdf -> name , & tctx -> tpdf -> type , basetype ,
2300- tctx -> tpdf -> name , base , plugin_id , & tpdf_chain , u + 1 , & base );
2300+ tctx -> tpdf -> name , base , plugin_ref , & tpdf_chain , u + 1 , & base );
23012301 LY_CHECK_GOTO (ret , cleanup );
23022302
23032303 /* store separately compiled typedef type to be reused */
@@ -2329,12 +2329,12 @@ lys_compile_type(struct lysc_ctx *ctx, struct lysp_node *context_pnode, uint16_t
23292329 if (type_p -> flags || type_p -> exts || !base || has_leafref ) {
23302330 /* leaf type has changes that need to be compiled into the type */
23312331 if (base ) {
2332- plugin_id = base -> plugin ;
2332+ plugin_ref = base -> plugin ;
23332333 } else {
2334- plugin_id = lyplg_type_plugin_find (ctx -> ctx , "" , NULL , ly_data_type2str [basetype ]);
2334+ plugin_ref = lyplg_type_plugin_find (ctx -> ctx , "" , NULL , ly_data_type2str [basetype ]);
23352335 }
23362336 ret = lys_compile_type_ (ctx , context_pnode , context_flags , context_name , (struct lysp_type * )type_p , basetype ,
2337- NULL , base , plugin_id , & tpdf_chain , 0 , type );
2337+ NULL , base , plugin_ref , & tpdf_chain , 0 , type );
23382338 LY_CHECK_GOTO (ret , cleanup );
23392339 } else {
23402340 /* no changes of the type in the leaf, just use the base compiled type */
0 commit comments