aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parse_execution.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-09-21 11:24:49 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-09-22 18:08:00 -0700
commitc1bd3b5824027f23b41bbac77c5e28f856c5dc18 (patch)
treef406ad2f859df99f65c059f8c4019d5a2db1e459 /src/parse_execution.cpp
parentfb615843b329b4d3c303b9cebe2af134a52b5bfd (diff)
Eliminate global variables associated with builtin IO
This change eliminates global variables like stdout_buffer. Instead we wrap up the IO information into a new struct io_streams_t, and thread that through every builtin. This makes the intent clearer, gives us a place to hang new IO data, and eliminates the ugly global state management like builtin_push_io.
Diffstat (limited to 'src/parse_execution.cpp')
-rw-r--r--src/parse_execution.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp
index c50619ed..471914f6 100644
--- a/src/parse_execution.cpp
+++ b/src/parse_execution.cpp
@@ -410,7 +410,8 @@ parse_execution_result_t parse_execution_context_t::run_function_statement(const
const wcstring contents_str = wcstring(this->src, contents_start, contents_end - contents_start);
int definition_line_offset = this->line_offset_of_character_at_offset(contents_start);
wcstring error_str;
- int err = define_function(*parser, argument_list, contents_str, definition_line_offset, &error_str);
+ io_streams_t streams;
+ int err = define_function(*parser, streams, argument_list, contents_str, definition_line_offset, &error_str);
proc_set_last_status(err);
if (! error_str.empty())