summaryrefslogtreecommitdiff
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-05-14 18:18:45 -0400
committerAdrian Thurston <thurston@colm.net>2018-05-14 18:18:45 -0400
commitfbc356e504c162663b33162225ebd2fc16b6076b (patch)
treeac0b452e641cd62e8e39893eae02cbe2e76a1b7f /src/bytecode.c
parent7ea72c88eeee3689af73cd6f92a81da3b27a92b0 (diff)
downloadcolm-fbc356e504c162663b33162225ebd2fc16b6076b.tar.gz
merged two cases in stream_append_text
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 880c89c3..a5fc1ea3 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -219,18 +219,7 @@ static word_t stream_append_text( program_t *prg, tree_t **sp, stream_t *dest, t
long length = 0;
struct stream_impl *impl = stream_to_impl( dest );
- if ( input->id == LEL_ID_STR ) {
- /* Collect the tree data. */
- StrCollect collect;
- init_str_collect( &collect );
- colm_print_tree_collect( prg, sp, &collect, input, false );
-
- /* Load it into the input. */
- impl->funcs->append_data( impl, collect.data, collect.length );
- length = collect.length;
- str_collect_destroy( &collect );
- }
- else if ( input->id == LEL_ID_PTR ) {
+ if ( input->id == LEL_ID_PTR ) {
colm_tree_upref( input );
impl->funcs->append_stream( impl, input );
}