@@ -179,10 +179,10 @@ int ly_log_options(int);
179179
180180LY_LOG_LEVEL ly_log_level (LY_LOG_LEVEL );
181181extern "Python" void lypy_log_cb (LY_LOG_LEVEL , const char * , const char * );
182- void ly_set_log_clb (void (* )(LY_LOG_LEVEL , const char * , const char * ), int );
183- struct ly_err_item * ly_err_first (const struct ly_ctx * );
182+ void ly_set_log_clb (void (* )(LY_LOG_LEVEL , const char * , const char * , const char * , uint64_t ));
183+ const struct ly_err_item * ly_err_first (const struct ly_ctx * );
184+ const struct ly_err_item * ly_err_last (const struct ly_ctx * );
184185void ly_err_clean (struct ly_ctx * , struct ly_err_item * );
185- LY_VECODE ly_vecode (const struct ly_ctx * );
186186
187187#define LYS_UNKNOWN ...
188188#define LYS_CONTAINER ...
@@ -238,14 +238,15 @@ struct lysc_node {
238238
239239struct ly_err_item {
240240 LY_LOG_LEVEL level ;
241- LY_ERR no ;
241+ LY_ERR err ;
242242 LY_VECODE vecode ;
243243 char * msg ;
244- char * path ;
244+ char * data_path ;
245+ char * schema_path ;
246+ uint64_t line ;
245247 char * apptag ;
246248 struct ly_err_item * next ;
247249 struct ly_err_item * prev ;
248- ...;
249250};
250251
251252struct lyd_node {
@@ -261,11 +262,12 @@ struct lyd_node {
261262
262263LY_ERR lys_set_implemented (struct lys_module * , const char * * );
263264
265+ #define LYD_NEW_VAL_OUTPUT ...
266+ #define LYD_NEW_VAL_BIN ...
267+ #define LYD_NEW_VAL_CANON ...
268+ #define LYD_NEW_META_CLEAR_DFLT ...
264269#define LYD_NEW_PATH_UPDATE ...
265- #define LYD_NEW_PATH_OUTPUT ...
266- #define LYD_NEW_PATH_OPAQ ...
267- #define LYD_NEW_PATH_BIN_VALUE ...
268- #define LYD_NEW_PATH_CANON_VALUE ...
270+ #define LYD_NEW_PATH_OPAQ ...
269271LY_ERR lyd_new_path (struct lyd_node * , const struct ly_ctx * , const char * , const char * , uint32_t , struct lyd_node * * );
270272LY_ERR lyd_find_xpath (const struct lyd_node * , const char * , struct ly_set * * );
271273void lyd_unlink_siblings (struct lyd_node * node );
@@ -614,6 +616,7 @@ struct lysp_node_list {
614616};
615617
616618struct lysc_type {
619+ const char * name ;
617620 struct lysc_ext_instance * exts ;
618621 struct lyplg_type * plugin ;
619622 LY_DATA_TYPE basetype ;
@@ -641,6 +644,7 @@ struct lysp_type {
641644struct lysp_qname {
642645 const char * str ;
643646 const struct lysp_module * mod ;
647+ ...;
644648};
645649
646650struct lysp_node {
@@ -682,7 +686,6 @@ struct lysc_ext {
682686 struct lysc_ext_instance * exts ;
683687 struct lyplg_ext * plugin ;
684688 struct lys_module * module ;
685- uint32_t refcount ;
686689 uint16_t flags ;
687690};
688691
@@ -703,11 +706,10 @@ typedef enum {
703706 LYD_PATH_STD_NO_LAST_PRED
704707} LYD_PATH_TYPE ;
705708
706- LY_ERR lyd_new_term (struct lyd_node * , const struct lys_module * , const char * , const char * , ly_bool , struct lyd_node * * );
709+ LY_ERR lyd_new_term (struct lyd_node * , const struct lys_module * , const char * , const char * , uint32_t , struct lyd_node * * );
707710char * lyd_path (const struct lyd_node * , LYD_PATH_TYPE , char * , size_t );
708711LY_ERR lyd_new_inner (struct lyd_node * , const struct lys_module * , const char * , ly_bool , struct lyd_node * * );
709- LY_ERR lyd_new_list (struct lyd_node * , const struct lys_module * , const char * , ly_bool , struct lyd_node * * , ...);
710- LY_ERR lyd_new_list2 (struct lyd_node * , const struct lys_module * , const char * , const char * , ly_bool , struct lyd_node * * );
712+ LY_ERR lyd_new_list (struct lyd_node * , const struct lys_module * , const char * , uint32_t , struct lyd_node * * node , ...);
711713
712714struct lyd_node_inner {
713715 union {
@@ -821,6 +823,7 @@ struct lysp_restr {
821823};
822824
823825struct lysc_type_num {
826+ const char * name ;
824827 struct lysc_ext_instance * exts ;
825828 struct lyplg_type * plugin ;
826829 LY_DATA_TYPE basetype ;
@@ -829,6 +832,7 @@ struct lysc_type_num {
829832};
830833
831834struct lysc_type_dec {
835+ const char * name ;
832836 struct lysc_ext_instance * exts ;
833837 struct lyplg_type * plugin ;
834838 LY_DATA_TYPE basetype ;
@@ -838,6 +842,7 @@ struct lysc_type_dec {
838842};
839843
840844struct lysc_type_str {
845+ const char * name ;
841846 struct lysc_ext_instance * exts ;
842847 struct lyplg_type * plugin ;
843848 LY_DATA_TYPE basetype ;
@@ -859,6 +864,7 @@ struct lysc_type_bitenum_item {
859864};
860865
861866struct lysc_type_enum {
867+ const char * name ;
862868 struct lysc_ext_instance * exts ;
863869 struct lyplg_type * plugin ;
864870 LY_DATA_TYPE basetype ;
@@ -867,6 +873,7 @@ struct lysc_type_enum {
867873};
868874
869875struct lysc_type_bits {
876+ const char * name ;
870877 struct lysc_ext_instance * exts ;
871878 struct lyplg_type * plugin ;
872879 LY_DATA_TYPE basetype ;
@@ -875,18 +882,19 @@ struct lysc_type_bits {
875882};
876883
877884struct lysc_type_leafref {
885+ const char * name ;
878886 struct lysc_ext_instance * exts ;
879887 struct lyplg_type * plugin ;
880888 LY_DATA_TYPE basetype ;
881889 uint32_t refcount ;
882890 struct lyxp_expr * path ;
883891 struct lysc_prefix * prefixes ;
884- const struct lys_module * cur_mod ;
885892 struct lysc_type * realtype ;
886893 uint8_t require_instance ;
887894};
888895
889896struct lysc_type_identityref {
897+ const char * name ;
890898 struct lysc_ext_instance * exts ;
891899 struct lyplg_type * plugin ;
892900 LY_DATA_TYPE basetype ;
@@ -895,6 +903,7 @@ struct lysc_type_identityref {
895903};
896904
897905struct lysc_type_instanceid {
906+ const char * name ;
898907 struct lysc_ext_instance * exts ;
899908 struct lyplg_type * plugin ;
900909 LY_DATA_TYPE basetype ;
@@ -903,6 +912,7 @@ struct lysc_type_instanceid {
903912};
904913
905914struct lysc_type_union {
915+ const char * name ;
906916 struct lysc_ext_instance * exts ;
907917 struct lyplg_type * plugin ;
908918 LY_DATA_TYPE basetype ;
@@ -911,6 +921,7 @@ struct lysc_type_union {
911921};
912922
913923struct lysc_type_bin {
924+ const char * name ;
914925 struct lysc_ext_instance * exts ;
915926 struct lyplg_type * plugin ;
916927 LY_DATA_TYPE basetype ;
@@ -1053,7 +1064,7 @@ LY_ERR lyd_merge_module(struct lyd_node **, const struct lyd_node *, const struc
10531064LY_ERR lyd_new_implicit_tree (struct lyd_node * , uint32_t , struct lyd_node * * );
10541065LY_ERR lyd_new_implicit_all (struct lyd_node * * , const struct ly_ctx * , uint32_t , struct lyd_node * * );
10551066
1056- LY_ERR lyd_new_meta (const struct ly_ctx * , struct lyd_node * , const struct lys_module * , const char * , const char * , ly_bool , struct lyd_meta * * );
1067+ LY_ERR lyd_new_meta (const struct ly_ctx * , struct lyd_node * , const struct lys_module * , const char * , const char * , uint32_t , struct lyd_meta * * );
10571068
10581069struct ly_opaq_name {
10591070 const char * name ;
0 commit comments