schema REFACTOR remove lyext_substmt2str() macro
It was just duplicating what ly_stmt2str() macro does.
diff --git a/src/parser_stmt.c b/src/parser_stmt.c
index f5118aa..4c21d74 100644
--- a/src/parser_stmt.c
+++ b/src/parser_stmt.c
@@ -125,7 +125,7 @@
const char **value, enum yang_arg arg, struct lysp_ext_instance **exts)
{
if (*value) {
- LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyext_substmt2str(stmt->kw));
+ LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, ly_stmt2str(stmt->kw));
return LY_EVALID;
}
@@ -138,7 +138,7 @@
LY_CHECK_RET(lysp_stmt_ext(ctx, child, stmt->kw, substmt_index, exts));
break;
default:
- LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(child->kw), lyext_substmt2str(stmt->kw));
+ LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(child->kw), ly_stmt2str(stmt->kw));
return LY_EVALID;
}
}
@@ -175,7 +175,7 @@
LY_CHECK_RET(lysp_stmt_ext(ctx, child, stmt->kw, LY_ARRAY_COUNT(*qnames) - 1, exts));
break;
default:
- LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(child->kw), lyext_substmt2str(stmt->kw));
+ LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(child->kw), ly_stmt2str(stmt->kw));
return LY_EVALID;
}
}
@@ -211,7 +211,7 @@
LY_CHECK_RET(lysp_stmt_ext(ctx, child, stmt->kw, LY_ARRAY_COUNT(*texts) - 1, exts));
break;
default:
- LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(child->kw), lyext_substmt2str(stmt->kw));
+ LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(child->kw), ly_stmt2str(stmt->kw));
return LY_EVALID;
}
}
diff --git a/src/parser_yang.c b/src/parser_yang.c
index cae5398..9649002 100644
--- a/src/parser_yang.c
+++ b/src/parser_yang.c
@@ -894,7 +894,7 @@
enum ly_stmt kw;
if (*value) {
- LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyext_substmt2str(substmt));
+ LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, ly_stmt2str(substmt));
return LY_EVALID;
}
@@ -910,7 +910,7 @@
LY_CHECK_RET(parse_ext(ctx, word, word_len, substmt, substmt_index, exts));
break;
default:
- LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(kw), lyext_substmt2str(substmt));
+ LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(kw), ly_stmt2str(substmt));
return LY_EVALID;
}
}
@@ -1266,7 +1266,7 @@
LY_CHECK_RET(parse_ext(ctx, word, word_len, substmt, LY_ARRAY_COUNT(*texts) - 1, exts));
break;
default:
- LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(kw), lyext_substmt2str(substmt));
+ LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(kw), ly_stmt2str(substmt));
return LY_EVALID;
}
}
@@ -1308,7 +1308,7 @@
LY_CHECK_RET(parse_ext(ctx, word, word_len, substmt, LY_ARRAY_COUNT(*qnames) - 1, exts));
break;
default:
- LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(kw), lyext_substmt2str(substmt));
+ LOGVAL_PARSER(ctx, LY_VCODE_INCHILDSTMT, ly_stmt2str(kw), ly_stmt2str(substmt));
return LY_EVALID;
}
}
@@ -2087,7 +2087,7 @@
break;
case LY_STMT_PATH:
if (type->path) {
- LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, lyext_substmt2str(LY_STMT_PATH));
+ LOGVAL_PARSER(ctx, LY_VCODE_DUPSTMT, ly_stmt2str(LY_STMT_PATH));
return LY_EVALID;
}
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index d22125a..6c13882 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -51,9 +51,6 @@
/* list of the YANG statements strings */
#define ly_stmt2str(STMT) stmt_attr_info[STMT].name
-/* extensions' substatements (LYEXT_SUBSTMT) strings */
-#define lyext_substmt2str(STMT) stmt_attr_info[STMT].name
-
/* list of the deviate modifications strings */
extern const char * const ly_devmod_list[];
#define ly_devmod2str(TYPE) ly_devmod_list[TYPE]