summaryrefslogtreecommitdiff
path: root/src/block-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/block-parser.c')
-rw-r--r--src/block-parser.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/block-parser.c b/src/block-parser.c
index 48c7671..f4ed78b 100644
--- a/src/block-parser.c
+++ b/src/block-parser.c
@@ -220,6 +220,26 @@ block_parser_set_as_used (BlockParser *parser, const gchar *key)
}
}
+/*
+ * block_parser_clear_key_data: clear stored data block for the key
+ *
+ */
+void
+block_parser_clear_key_data (BlockParser *parser, const gchar *key)
+{
+ BlockData *data = NULL;
+
+ g_assert (parser != NULL);
+
+ data = g_hash_table_lookup (parser->table, key);
+ if (data != NULL) {
+ g_free (data->data);
+ data->data = NULL;
+ data->used = FALSE;
+ data->finished = FALSE;
+ }
+}
+
/* -------------------------------------------------------------------------------------------------------- */