errors
This commit is contained in:
@@ -1255,11 +1255,11 @@ char *Yap_TermToBuffer(Term t, encoding_t enc, int flags) {
|
||||
CACHE_REGS
|
||||
int sno = Yap_open_buf_write_stream(enc, flags);
|
||||
const char *sf;
|
||||
DBTerm *e = LOCAL_BallTerm;
|
||||
yap_error_descriptor_t ne;
|
||||
|
||||
if (sno < 0)
|
||||
return NULL;
|
||||
LOCAL_c_output_stream = sno;
|
||||
Yap_pushErrorContext(&ne);
|
||||
if (enc)
|
||||
GLOBAL_Stream[sno].encoding = enc;
|
||||
else
|
||||
@@ -1271,7 +1271,6 @@ char *Yap_TermToBuffer(Term t, encoding_t enc, int flags) {
|
||||
char *new = malloc(len + 1);
|
||||
strcpy(new, sf);
|
||||
Yap_CloseStream(sno);
|
||||
if (e)
|
||||
LOCAL_BallTerm = e;
|
||||
Yap_popErrorContext (true);
|
||||
return new;
|
||||
}
|
||||
|
Reference in New Issue
Block a user