fix modules bug

fix newly introduced coroutining bug


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@478 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-05-20 05:24:13 +00:00
parent 9674c91da6
commit 330b262560
2 changed files with 4 additions and 2 deletions

View File

@ -632,7 +632,7 @@ void InitAttVarPreds(void)
InitCPred("inc_n_of_atts", 1, p_inc_atts, SafePredFlag); InitCPred("inc_n_of_atts", 1, p_inc_atts, SafePredFlag);
InitCPred("n_of_atts", 1, p_n_atts, SafePredFlag); InitCPred("n_of_atts", 1, p_n_atts, SafePredFlag);
InitCPred("bind_attvar", 1, p_bind_attvar, SafePredFlag); InitCPred("bind_attvar", 1, p_bind_attvar, SafePredFlag);
InitCPred("$all_attvars", 1, p_all_attvars, SafePredFlag); InitCPred("all_attvars", 1, p_all_attvars, SafePredFlag);
InitCPred("$is_att_variable", 1, p_is_attvar, SafePredFlag); InitCPred("$is_att_variable", 1, p_is_attvar, SafePredFlag);
} }

View File

@ -118,8 +118,10 @@ InitModules(void)
{ {
ModuleName[PrimitivesModule = 0] = ModuleName[PrimitivesModule = 0] =
MkAtomTerm(LookupAtom("prolog")); MkAtomTerm(LookupAtom("prolog"));
ModuleName[1] =
MkAtomTerm(LookupAtom("user"));
NoOfModules = 2;
CurrentModule = 0; CurrentModule = 0;
ModuleName[1] = MkAtomTerm(LookupAtom("user"));
InitCPred("$current_module", 2, p_current_module, SafePredFlag|SyncPredFlag); InitCPred("$current_module", 2, p_current_module, SafePredFlag|SyncPredFlag);
InitCPred("$current_module", 1, p_current_module1, SafePredFlag|SyncPredFlag); InitCPred("$current_module", 1, p_current_module1, SafePredFlag|SyncPredFlag);
InitCPred("$change_module", 1, p_change_module, SafePredFlag|SyncPredFlag); InitCPred("$change_module", 1, p_change_module, SafePredFlag|SyncPredFlag);