From 98de12268711a1418f0e78d167dc5ec086127373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Thu, 3 Nov 2011 07:49:41 +0900 Subject: [PATCH] UserCCode shouldn't be allowed to look up hidden atoms. --- C/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C/init.c b/C/init.c index 6f1c69559..8a09598d2 100644 --- a/C/init.c +++ b/C/init.c @@ -409,7 +409,10 @@ Yap_InitCPred(char *Name, unsigned long int Arity, CPredicate code, UInt flags) Functor f = NULL; while (atom == NIL) { - atom = Yap_FullLookupAtom(Name); + if (flags & UserCPredFlag) + atom = Yap_LookupAtom(Name); + else + atom = Yap_FullLookupAtom(Name); if (atom == NIL && !Yap_growheap(FALSE, 0L, NULL)) { Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"while initialising %s", Name); return;