Skip to content

Commit c776def

Browse files
unhacked the machine, properish implementation now
1 parent 37f391e commit c776def

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/machine/system_calls.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::heap_print::*;
1616
#[cfg(feature = "http")]
1717
use crate::http::{HttpListener, HttpRequest, HttpRequestData, HttpResponse};
1818
use crate::instructions::*;
19-
use crate::{machine, MachineBuilder, StreamConfig};
19+
use crate::{machine};
2020
use crate::machine::code_walker::*;
2121
use crate::machine::copier::*;
2222
use crate::machine::heap::*;
@@ -1913,9 +1913,7 @@ impl Machine {
19131913
#[inline(always)]
19141914
pub(crate) fn memory_stream(&mut self) -> CallResult {
19151915
let addr = self.deref_register(1);
1916-
let stream = MachineBuilder::new()
1917-
.with_streams(StreamConfig::in_memory())
1918-
.build().user_input;
1916+
let stream = Stream::from_owned_string("".to_string(), &mut self.machine_st.arena);
19191917

19201918
if let Some(var) = addr.as_var() {
19211919
self.machine_st.bind(var, stream.into());

0 commit comments

Comments
 (0)