Displaying 2 results from an estimated 2 matches for "f32534c".
Did you mean:
32534
2014 Mar 20
5
[PATCH 1/3] builder/virt-index-validate: try to cleanup in any occasion
Always close the file (ignoring its result) after a parsing, and cleanup
the parse_context object before any exit().
This eases the debugging of memory issues in the actual parser.
---
builder/index-validate.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/builder/index-validate.c b/builder/index-validate.c
index 4b7fe93..fed0f81 100644
---
2014 Mar 19
7
[PATCH 1/3] builder: make the C index parser reentrant
...*scanner, struct parse_context *context, FILE *in)
+{
+ yylex_init (scanner);
+ yyset_extra (context, *scanner);
+ yyset_in (in, *scanner);
+}
+
+void
+scanner_destroy (yyscan_t scanner)
+{
+ yylex_destroy (scanner);
+}
diff --git a/builder/index-struct.c b/builder/index-struct.c
index fe5b0e3..f32534c 100644
--- a/builder/index-struct.c
+++ b/builder/index-struct.c
@@ -20,19 +20,23 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "index-struct.h"
-struct section *parsed_index = NULL;
-int seen_comments = 0;
-
static void free_section (...