summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-26 17:04:26 -0400
committerKaz Kylheku <kaz@kylheku.com>2011-10-26 17:04:26 -0400
commit12c1371bbbb2d8e6f693b3d2e1e5a91c32c63520 (patch)
treee79422ac8ed142b127c42da1597f955d3e69ab94 /parser.l
parentad46d49574ea8ada67d8644c70817502c8591305 (diff)
downloadtxr-12c1371bbbb2d8e6f693b3d2e1e5a91c32c63520.tar.gz
txr-12c1371bbbb2d8e6f693b3d2e1e5a91c32c63520.tar.bz2
txr-12c1371bbbb2d8e6f693b3d2e1e5a91c32c63520.zip
Bugfix: prepared_error_message variable needs to be gc-protected.
* parser.h (parse_init): Declared. * parser.l (parse_init): New function. * txr.c (main): Call parse_init. (txr_main): No need to gc-protect yyin_stream since parse_init does it.
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l5
1 files changed, 5 insertions, 0 deletions
diff --git a/parser.l b/parser.l
index 08bdfbb3..af6da051 100644
--- a/parser.l
+++ b/parser.l
@@ -589,3 +589,8 @@ void end_of_regex(void)
|| yy_top_state() == QSILIT)
yy_pop_state();
}
+
+void parse_init(void)
+{
+ protect(&yyin_stream, &prepared_error_message, (val *) 0);
+}