diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-21 20:32:39 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-21 20:32:39 +0200 |
| commit | e8f78907830c525dccf1f4a5e6f97a15780c54ef (patch) | |
| tree | 616bf72243e22cfb034cf2fab4bb99a927db61da /src/ast.c | |
| parent | 284be00c81407735cc8ddec1f1353b867b2deffd (diff) | |
| download | ek-e8f78907830c525dccf1f4a5e6f97a15780c54ef.tar.gz ek-e8f78907830c525dccf1f4a5e6f97a15780c54ef.zip | |
add type visibility checks
+ Essentially require that each type used in a public symbol only use
types that are exported out of the file as well
Diffstat (limited to 'src/ast.c')
| -rw-r--r-- | src/ast.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -149,6 +149,17 @@ void ast_set_flags(struct ast *node, enum ast_flags flags) node->f |= flags; } +static int _ast_set_flags(struct ast *node, enum ast_flags *flags) +{ + ast_set_flags(node, *flags); + return 0; +} + +void ast_set_flags_recurse(struct ast *node, enum ast_flags flags) +{ + ast_visit((ast_callback_t)_ast_set_flags, NULL, node, &flags); +} + void ast_clear_flags(struct ast *node, enum ast_flags flags) { node->f &= ~(flags); |
