halt_hooks should not be in save/restore, this will cause trouble.
This commit is contained in:
parent
863747da7b
commit
2a8854094b
@ -217,3 +217,5 @@
|
||||
#define Yap_PL_Argc Yap_global->pl_argc
|
||||
#define Yap_PL_Argv Yap_global->pl_argv
|
||||
|
||||
#define Yap_HaltHooks Yap_global->yap_halt_hook
|
||||
|
||||
|
@ -263,8 +263,6 @@
|
||||
|
||||
#define Stream Yap_heap_regs->yap_streams
|
||||
|
||||
#define Yap_HaltHooks Yap_heap_regs->yap_halt_hook
|
||||
|
||||
#define NOfFileAliases Yap_heap_regs->n_of_file_aliases
|
||||
#define SzOfFileAliases Yap_heap_regs->sz_of_file_aliases
|
||||
#define FileAliases Yap_heap_regs->file_aliases
|
||||
|
@ -218,4 +218,6 @@ typedef struct worker_shared {
|
||||
int initialised_from_pl;
|
||||
int pl_argc;
|
||||
char **pl_argv;
|
||||
|
||||
struct halt_hook *yap_halt_hook;
|
||||
} w_shared;
|
||||
|
@ -263,8 +263,6 @@
|
||||
|
||||
struct stream_desc *yap_streams;
|
||||
|
||||
struct halt_hook *yap_halt_hook;
|
||||
|
||||
UInt n_of_file_aliases;
|
||||
UInt sz_of_file_aliases;
|
||||
struct AliasDescS *file_aliases;
|
||||
|
@ -216,4 +216,6 @@ static void InitGlobal(void) {
|
||||
Yap_global->initialised_from_pl = FALSE;
|
||||
Yap_global->pl_argc = 0;
|
||||
Yap_global->pl_argv = NULL;
|
||||
|
||||
Yap_global->yap_halt_hook = NULL;
|
||||
}
|
||||
|
@ -263,8 +263,6 @@
|
||||
|
||||
Yap_heap_regs->yap_streams = NULL;
|
||||
|
||||
Yap_heap_regs->yap_halt_hook = NULL;
|
||||
|
||||
Yap_heap_regs->n_of_file_aliases = 0;
|
||||
Yap_heap_regs->sz_of_file_aliases = 0;
|
||||
Yap_heap_regs->file_aliases = NULL;
|
||||
|
@ -216,4 +216,6 @@ static void RestoreGlobal(void) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
12
H/rheap.h
12
H/rheap.h
@ -903,18 +903,6 @@ RestoreDBErasedIList(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
RestoreHaltHooks(void)
|
||||
{
|
||||
struct halt_hook *hooke = Yap_HaltHooks = HaltHookAdjust(Yap_HaltHooks);
|
||||
|
||||
while (hooke) {
|
||||
hooke->next = HaltHookAdjust(hooke->next);
|
||||
hooke = hooke->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
RestoreStreams(void)
|
||||
{
|
||||
|
@ -263,8 +263,6 @@
|
||||
|
||||
RestoreStreams();
|
||||
|
||||
RestoreHaltHooks();
|
||||
|
||||
|
||||
|
||||
RestoreAliases();
|
||||
|
@ -245,5 +245,8 @@ int initialised_from_pl Yap_InitialisedFromPL =FALSE
|
||||
int pl_argc Yap_PL_Argc =0
|
||||
char **pl_argv Yap_PL_Argv =NULL
|
||||
|
||||
// halt hooks
|
||||
struct halt_hook *yap_halt_hook Yap_HaltHooks =NULL
|
||||
|
||||
END_WORKER_SHARED
|
||||
|
||||
|
@ -295,9 +295,6 @@ struct operator_entry *op_list OpList =NULL OpListAdjust
|
||||
/* stream array */
|
||||
struct stream_desc *yap_streams Stream =NULL RestoreStreams()
|
||||
|
||||
/* halt hooks */
|
||||
struct halt_hook *yap_halt_hook Yap_HaltHooks =NULL RestoreHaltHooks()
|
||||
|
||||
/* stream aliases */
|
||||
UInt n_of_file_aliases NOfFileAliases =0 void
|
||||
UInt sz_of_file_aliases SzOfFileAliases =0 void
|
||||
|
Reference in New Issue
Block a user