From 12c1371bbbb2d8e6f693b3d2e1e5a91c32c63520 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 26 Oct 2011 17:04:26 -0400 Subject: 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. --- txr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'txr.c') diff --git a/txr.c b/txr.c index 706e9ee1..410339c5 100644 --- a/txr.c +++ b/txr.c @@ -146,6 +146,7 @@ int main(int argc, char **argv) progname = argv[0] ? utf8_dup_from(argv[0]) : progname; init(progname, oom_realloc_handler, &stack_bottom); match_init(); + parse_init(); return txr_main(argc, argv); } @@ -159,7 +160,6 @@ int txr_main(int argc, char **argv) prot1(&spec_file_str); yyin_stream = std_input; - prot1(&yyin_stream); if (argc <= 1) { hint(); -- cgit v1.2.3