Displaying 1 result from an estimated 1 matches for "9480526".
2014 Mar 19
7
[PATCH 1/3] builder: make the C index parser reentrant
...e_context *context)
+{
+ memset (context, 0, sizeof *context);
+}
+
+void
+parse_context_free (struct parse_context *context)
{
- free_section (parsed_index);
+ free_section (context->parsed_index);
}
static void
diff --git a/builder/index-struct.h b/builder/index-struct.h
index f92e01d..9480526 100644
--- a/builder/index-struct.h
+++ b/builder/index-struct.h
@@ -36,14 +36,19 @@ struct field {
char *value;
};
-/* The parser (yyparse) stores the result here. */
-extern struct section *parsed_index;
+/* A struct holding the data needed during the parsing. */
+struct parse_context {
+...