fix bad compilation of varargs preds.
This commit is contained in:
parent
8e55611d90
commit
251ac240b6
@ -110,7 +110,7 @@ UserCPredicateVarargs(char *a, CPredicate def, unsigned long int arity, Term mod
|
|||||||
PredEntry *pe;
|
PredEntry *pe;
|
||||||
Term cm = CurrentModule;
|
Term cm = CurrentModule;
|
||||||
CurrentModule = mod;
|
CurrentModule = mod;
|
||||||
Yap_InitCPred(a, arity, def, UserCPredFlag);
|
Yap_InitCPred(a, arity, def, UserCPredFlag|SWIEnvPredFlag);
|
||||||
if (arity == 0) {
|
if (arity == 0) {
|
||||||
pe = RepPredProp(PredPropByAtom(Yap_LookupAtom(a),mod));
|
pe = RepPredProp(PredPropByAtom(Yap_LookupAtom(a),mod));
|
||||||
} else {
|
} else {
|
||||||
@ -2014,9 +2014,9 @@ X_API void PL_register_foreign_in_module(const char *module, const char *name, i
|
|||||||
} else {
|
} else {
|
||||||
tmod = MkAtomTerm(Yap_LookupAtom((char *)module));
|
tmod = MkAtomTerm(Yap_LookupAtom((char *)module));
|
||||||
}
|
}
|
||||||
if (flags & PL_FA_VARARGS)
|
if (flags & PL_FA_VARARGS) {
|
||||||
UserCPredicateVarargs((char *)name,(CPredicate)function,arity,tmod);
|
UserCPredicateVarargs((char *)name,(CPredicate)function,arity,tmod);
|
||||||
if (flags & PL_FA_NONDETERMINISTIC) {
|
} else if (flags & PL_FA_NONDETERMINISTIC) {
|
||||||
Yap_InitCPredBack((char *)name, arity, sizeof(struct foreign_context)/sizeof(CELL), (CPredicate)function, (CPredicate)function, UserCPredFlag|SWIEnvPredFlag);
|
Yap_InitCPredBack((char *)name, arity, sizeof(struct foreign_context)/sizeof(CELL), (CPredicate)function, (CPredicate)function, UserCPredFlag|SWIEnvPredFlag);
|
||||||
} else if (flags & PL_FA_TRANSPARENT)
|
} else if (flags & PL_FA_TRANSPARENT)
|
||||||
UserCPredicateWithArgs((char *)name,(CPredicate)function,arity,tmod,ModuleTransparentPredFlag);
|
UserCPredicateWithArgs((char *)name,(CPredicate)function,arity,tmod,ModuleTransparentPredFlag);
|
||||||
|
Reference in New Issue
Block a user