Skip to content

Commit 243a6b0

Browse files
committed
update to functions in CESNET/libyang#2352
1 parent 6f4c844 commit 243a6b0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

cffi/cdefs.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -861,9 +861,8 @@ const struct lysc_node* lys_find_child(const struct lysc_node *, const struct ly
861861
const struct lysc_node* lysc_node_child(const struct lysc_node *);
862862
const struct lysc_node_action* lysc_node_actions(const struct lysc_node *);
863863
const struct lysc_node_notif* lysc_node_notifs(const struct lysc_node *);
864-
ly_bool lysc_node_has_ancestor(const struct lysc_node *, const struct lysc_node *);
865-
LY_ERR lysc_node_find_lref_targets(const struct lysc_node *, struct ly_set **);
866-
LY_ERR lys_find_backlinks(const struct ly_ctx *, const struct lysc_node *, ly_bool, struct ly_set **);
864+
LY_ERR lysc_node_lref_targets(const struct lysc_node *, struct ly_set **);
865+
LY_ERR lysc_node_lref_backlinks(const struct ly_ctx *, const struct lysc_node *, ly_bool, struct ly_set **);
867866

868867
typedef enum {
869868
LYD_PATH_STD,

libyang/context.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ def find_leafref_path_target_paths(self, leafref_path: str) -> list[str]:
676676
raise self.error("leafref_path not found")
677677

678678
node_set = ffi.new("struct ly_set **")
679-
if (lib.lysc_node_find_lref_targets(node, node_set) != lib.LY_SUCCESS or
679+
if (lib.lysc_node_lref_targets(node, node_set) != lib.LY_SUCCESS or
680680
node_set[0] == ffi.NULL or node_set[0].count == 0):
681681
raise self.error("leafref_path does not contain any leafref targets")
682682

@@ -730,7 +730,7 @@ def find_backlinks_paths(self, match_path: str = None, match_ancestors: bool = F
730730
raise self.error("match_path not found")
731731

732732
node_set = ffi.new("struct ly_set **")
733-
if (lib.lys_find_backlinks(self.cdata, match_node, match_ancestors, node_set)
733+
if (lib.lysc_node_lref_backlinks(self.cdata, match_node, match_ancestors, node_set)
734734
!= lib.LY_SUCCESS or node_set[0] == ffi.NULL or node_set[0].count == 0):
735735
raise self.error("backlinks not found")
736736

0 commit comments

Comments
 (0)