Merge pull request #1116 from aarroyoc/fix-open-lis

Allow all kinds of string to be processed in open/4
This commit is contained in:
Mark Thom
2021-11-28 16:18:02 -05:00
committed by GitHub
3 changed files with 9 additions and 26 deletions

View File

@@ -1477,7 +1477,11 @@ open(SourceSink, Mode, Stream, StreamOptions) :-
( SourceSink = stream(S0) ->
'$set_stream_options'(S0, Alias, EOFAction, Reposition, Type),
Stream = S0
; '$open'(SourceSink, Mode, Stream, Alias, EOFAction, Reposition, Type)
; (
atom(SourceSink) ->
atom_chars(SourceSink, SourceSinkString)
; SourceSink = SourceSinkString
), '$open'(SourceSinkString, Mode, Stream, Alias, EOFAction, Reposition, Type)
)
).