summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-10-09 21:32:52 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-10-09 21:32:52 -0700
commit6ce1525fee353cd85ce9e8a1f76be29fd390b5ae (patch)
tree918d3ef4e3fd37562f674de8b53db83fc95c0dbd
parentf3d6e9bd89dcc6a3dfe2e9ce8ad221291843edaf (diff)
downloadtxr-6ce1525fee353cd85ce9e8a1f76be29fd390b5ae.tar.gz
txr-6ce1525fee353cd85ce9e8a1f76be29fd390b5ae.tar.bz2
txr-6ce1525fee353cd85ce9e8a1f76be29fd390b5ae.zip
* 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.
-rw-r--r--ChangeLog10
-rw-r--r--stream.c1
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 78132b2d..8fa0faf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
12014-10-09 Kaz Kylheku <kaz@kylheku.com>
2
3 * stream.c (stream_init): No need to gc-protect
4 std_input, std_output, std_debug, std_error and std_null. These are
5 not ordinary variables but macros which expand to locations in the
6 variable binding environment that are already protected. This call was
7 actually doing nothing, because the symbol involved in the expression
8 std_input is not yet initialized and so &std_input yields a null
9 pointer which causes protect to bail.
10
12014-10-08 Kaz Kylheku <kaz@kylheku.com> 112014-10-08 Kaz Kylheku <kaz@kylheku.com>
2 12
3 Moving system interface functions to separate module out of 13 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)
2548 2548
2549void stream_init(void) 2549void stream_init(void)
2550{ 2550{
2551 protect(&std_input, &std_output, &std_debug, &std_error, &std_null, (val *) 0);
2552 detect_format_string(); 2551 detect_format_string();
2553 2552
2554 dev_k = intern(lit("dev"), keyword_package); 2553 dev_k = intern(lit("dev"), keyword_package);