pbx: Create pbx_include.c for management of 'struct ast_include'.
[asterisk/asterisk.git] / utils / extconf.c
index 48053ae..3a0b2e9 100644 (file)
@@ -4381,6 +4381,19 @@ static struct ast_include *ast_walk_context_includes(struct ast_context *con,
                return inc->next;
 }
 
+int ast_context_includes_count(struct ast_context *con);
+int ast_context_includes_count(struct ast_context *con)
+{
+       int c = 0;
+       struct ast_include *inc = NULL;
+
+       while ((inc = ast_walk_context_includes(con, inc))) {
+               c++;
+       }
+
+       return c;
+}
+
 struct ast_include *localized_walk_context_includes(struct ast_context *con,
                                                                                                        struct ast_include *inc);
 struct ast_include *localized_walk_context_includes(struct ast_context *con,