diff options
Diffstat (limited to 'src/block-parser.c')
| -rw-r--r-- | src/block-parser.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/block-parser.c b/src/block-parser.c index d4a04c1..d4fcccb 100644 --- a/src/block-parser.c +++ b/src/block-parser.c @@ -147,6 +147,23 @@ block_parser_has_unused_data (BlockParser *parser, const gchar *key) return FALSE; } +/* + * block_parser_set_as_used: manually set data as used - sometimes blocks can act as containers for other nested blocks and + * cannot be used itself + * + */ +void +block_parser_set_as_used (BlockParser *parser, const gchar *key) +{ + BlockData *data = NULL; + + g_assert (parser != NULL); + + data = g_hash_table_lookup (parser->table, key); + if (data != NULL && data->finished == TRUE) { + data->used = TRUE; + } +} |
