diff --git a/cffi/cdefs.h b/cffi/cdefs.h index 39e4435..24688fc 100644 --- a/cffi/cdefs.h +++ b/cffi/cdefs.h @@ -15,6 +15,7 @@ struct ly_ctx; #define LY_CTX_REF_IMPLEMENTED ... #define LY_CTX_SET_PRIV_PARSED ... #define LY_CTX_LEAFREF_EXTENDED ... +#define LY_CTX_LEAFREF_LINKING ... typedef enum { diff --git a/libyang/context.py b/libyang/context.py index f0471cb..1300a09 100644 --- a/libyang/context.py +++ b/libyang/context.py @@ -30,6 +30,7 @@ def __init__( disable_searchdir_cwd: bool = True, explicit_compile: Optional[bool] = False, leafref_extended: bool = False, + leafref_linking: bool = False, yanglib_path: Optional[str] = None, yanglib_fmt: str = "json", cdata=None, # C type: "struct ly_ctx *" @@ -47,6 +48,8 @@ def __init__( options |= lib.LY_CTX_EXPLICIT_COMPILE if leafref_extended: options |= lib.LY_CTX_LEAFREF_EXTENDED + if leafref_linking: + options |= lib.LY_CTX_LEAFREF_LINKING # force priv parsed options |= lib.LY_CTX_SET_PRIV_PARSED