Encapsulate accesses to IndexStore::streams and ::stream_aliases
These two fields are able to hold `Stream` instances, which predicates like `close/1` expect to be managed properly for their correctness. To ensure that this is the case, I have removed direct accesses to those two fields, so that they can be properly managed in one place.
This commit is contained in:
@@ -1808,7 +1808,7 @@ impl Machine {
|
||||
pub(crate) fn push_load_context(&mut self) -> CallResult {
|
||||
let stream = self.machine_st.get_stream_or_alias(
|
||||
self.machine_st.registers[1],
|
||||
&self.indices.stream_aliases,
|
||||
&self.indices,
|
||||
atom!("$push_load_context"),
|
||||
2,
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user