printer YANG FEATURE initial implementation of YANG printer
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index ef83436..6fda323 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -1215,3 +1215,18 @@
return NULL;
}
+unsigned int
+lysp_ext_instance_iter(struct lysp_ext_instance *ext, unsigned int index, LYEXT_SUBSTMT substmt)
+{
+ LY_CHECK_ARG_RET(NULL, ext, LY_EINVAL);
+
+ for (; index < LY_ARRAY_SIZE(ext); index++) {
+ if (ext[index].insubstmt == substmt) {
+ return index;
+ }
+ }
+
+ return LY_ARRAY_SIZE(ext);
+}
+
+