From 6ce1525fee353cd85ce9e8a1f76be29fd390b5ae Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 9 Oct 2014 21:32:52 -0700 Subject: * stream.c (stream_init): No need to gc-protect std_input, std_output, std_debug, std_error and std_null. These are not ordinary variables but macros which expand to locations in the variable binding environment that are already protected. This call was actually doing nothing, because the symbol involved in the expression std_input is not yet initialized and so &std_input yields a null pointer which causes protect to bail. --- ChangeLog | 10 ++++++++++ stream.c | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 78132b2d..8fa0faf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2014-10-09 Kaz Kylheku + + * stream.c (stream_init): No need to gc-protect + std_input, std_output, std_debug, std_error and std_null. These are + not ordinary variables but macros which expand to locations in the + variable binding environment that are already protected. This call was + actually doing nothing, because the symbol involved in the expression + std_input is not yet initialized and so &std_input yields a null + pointer which causes protect to bail. + 2014-10-08 Kaz Kylheku Moving system interface functions to separate module out of diff --git a/stream.c b/stream.c index d55974cb..958ba9d5 100644 --- a/stream.c +++ b/stream.c @@ -2548,7 +2548,6 @@ val abs_path_p(val path) void stream_init(void) { - protect(&std_input, &std_output, &std_debug, &std_error, &std_null, (val *) 0); detect_format_string(); dev_k = intern(lit("dev"), keyword_package); -- cgit v1.2.3