fix existing-stream ase for with_output_to/2
This commit is contained in:
parent
81c00f9736
commit
957aa9f977
@ -1210,10 +1210,11 @@ static Int with_output_to(USES_REGS1) {
|
|||||||
(f == FunctorAtom || f == FunctorString || f == FunctorCodes1 ||
|
(f == FunctorAtom || f == FunctorString || f == FunctorCodes1 ||
|
||||||
f == FunctorCodes || f == FunctorChars1 || f == FunctorChars)) {
|
f == FunctorCodes || f == FunctorChars1 || f == FunctorChars)) {
|
||||||
output_stream = Yap_OpenBufWriteStream(PASS_REGS1);
|
output_stream = Yap_OpenBufWriteStream(PASS_REGS1);
|
||||||
mem_stream = true;
|
my_mem_stream = true;
|
||||||
} else {
|
} else {
|
||||||
/* needs to change LOCAL_c_output_stream for write */
|
/* needs to change LOCAL_c_output_stream for write */
|
||||||
output_stream = Yap_CheckStream(ARG1, Output_Stream_f, "format/3");
|
output_stream = Yap_CheckStream(ARG1, Output_Stream_f, "format/3");
|
||||||
|
my_mem_stream = false;
|
||||||
}
|
}
|
||||||
if (output_stream == -1) {
|
if (output_stream == -1) {
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user