UserCCode shouldn't be allowed to look up hidden atoms.
This commit is contained in:
parent
d690ffdb18
commit
98de122687
3
C/init.c
3
C/init.c
@ -409,6 +409,9 @@ Yap_InitCPred(char *Name, unsigned long int Arity, CPredicate code, UInt flags)
|
|||||||
Functor f = NULL;
|
Functor f = NULL;
|
||||||
|
|
||||||
while (atom == NIL) {
|
while (atom == NIL) {
|
||||||
|
if (flags & UserCPredFlag)
|
||||||
|
atom = Yap_LookupAtom(Name);
|
||||||
|
else
|
||||||
atom = Yap_FullLookupAtom(Name);
|
atom = Yap_FullLookupAtom(Name);
|
||||||
if (atom == NIL && !Yap_growheap(FALSE, 0L, NULL)) {
|
if (atom == NIL && !Yap_growheap(FALSE, 0L, NULL)) {
|
||||||
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"while initialising %s", Name);
|
Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"while initialising %s", Name);
|
||||||
|
Reference in New Issue
Block a user