be sure to reinitialise IO after Restore.

This commit is contained in:
Vítor Santos Costa 2011-04-04 14:36:06 +01:00
parent 7463cbea96
commit fb6b44a96e

View File

@ -1762,6 +1762,9 @@ Restore(char *s, char *lib_dir USES_REGS)
}
Yap_ReOpenLoadForeign();
FreeRecords();
/* restart IO */
initIO();
/* reset time */
Yap_ReInitWallTime();
Yap_InitSysPath();
@ -1770,7 +1773,6 @@ Restore(char *s, char *lib_dir USES_REGS)
Yap_InitPreAllocCodeSpace();
}
#endif
FreeRecords();
CloseRestore();
if (which_save == 2) {
Yap_unify(ARG2, MkIntTerm(0));