Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cffi/cdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ struct lyd_value_union {

const char * lyd_get_value(const struct lyd_node *);
struct lyd_node* lyd_child(const struct lyd_node *);
ly_bool lyd_is_default(const struct lyd_node *);
LY_ERR lyd_find_path(const struct lyd_node *, const char *, ly_bool, struct lyd_node **);
void lyd_free_siblings(struct lyd_node *);
struct lyd_node* lyd_first_sibling(const struct lyd_node *);
Expand Down
3 changes: 3 additions & 0 deletions libyang/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ def flags(self):
ret["new"] = True
return ret

def is_default(self) -> bool:
return lib.lyd_is_default(self.cdata)

def set_when(self, value: bool):
if value:
self.cdata.flags |= lib.LYD_WHEN_TRUE
Expand Down