more fixes to modules
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2102 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -218,14 +218,17 @@ init_current_module(void)
|
||||
static Int
|
||||
p_strip_module(void)
|
||||
{
|
||||
Term t1 = Deref(ARG1), t2, tmod;
|
||||
Term t1 = Deref(ARG1), t2, tmod = CurrentModule;
|
||||
if (tmod == PROLOG_MODULE) {
|
||||
tmod = TermProlog;
|
||||
}
|
||||
if (IsVarTerm(t1) ||
|
||||
!IsApplTerm(t1) ||
|
||||
FunctorOfTerm(t1) != FunctorModule ||
|
||||
IsVarTerm(t2 = ArgOfTerm(1,t1)) ||
|
||||
!IsAtomTerm(t2)) {
|
||||
return Yap_unify(ARG3, t1) &&
|
||||
Yap_unify(ARG2, CurrentModule);
|
||||
Yap_unify(ARG2, tmod);
|
||||
}
|
||||
do {
|
||||
tmod = t2;
|
||||
|
Reference in New Issue
Block a user