Skip to content

Commit 8a6dc88

Browse files
samuel-gauthierrjarry
authored andcommitted
cffi: update lys[c,p]_ext_instance to latest libyang
The commit 193dacdfac53 ("plugins exts CHANGE ext parsing isolated into a callback") reworked the lysp_ext_instance and lysc_ext_instance structures. Take it into account, and update the minimum version needed (2.25.0). Link: CESNET/libyang@193dacdfac53 Fixes: #57 Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
1 parent b5f6876 commit 8a6dc88

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

cffi/cdefs.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,16 @@ struct lysp_ext_instance {
420420
const char *name;
421421
const char *argument;
422422
LY_VALUE_FORMAT format;
423-
struct lysp_node *parsed;
424423
void *prefix_data;
425-
struct lysp_stmt *child;
424+
struct lysp_ext *def;
426425
void *parent;
427426
enum ly_stmt parent_stmt;
428427
uint64_t parent_stmt_index;
429428
uint16_t flags;
429+
const struct lyplg_ext_record *record;
430+
struct lysp_ext_substmt *substmts;
431+
void *parsed;
432+
struct lysp_stmt *child;
430433
};
431434

432435
struct lysp_import {
@@ -662,11 +665,11 @@ struct lysc_ext_instance {
662665
const char *argument;
663666
struct lys_module *module;
664667
struct lysc_ext_instance *exts;
665-
struct lysc_ext_substmt *substmts;
666-
void *data;
667668
void *parent;
668669
enum ly_stmt parent_stmt;
669-
...;
670+
uint64_t parent_stmt_index;
671+
struct lysc_ext_substmt *substmts;
672+
void *compiled;
670673
};
671674

672675
struct lysc_ext {

cffi/source.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
#if (LY_VERSION_MAJOR != 2)
1010
#error "This version of libyang bindings only works with libyang 2.x"
1111
#endif
12-
#if (LY_VERSION_MINOR < 19)
13-
#error "Need at least libyang 2.19"
12+
#if (LY_VERSION_MINOR < 25)
13+
#error "Need at least libyang 2.25"
1414
#endif

0 commit comments

Comments
 (0)