make swi functors more robust to confusion with atoms.
This commit is contained in:
parent
514758e65b
commit
f03f353722
@ -117,10 +117,10 @@ FunctorToSWIFunctor(Functor at)
|
||||
static inline Functor
|
||||
SWIFunctorToFunctor(functor_t at)
|
||||
{
|
||||
if ((CELL)(at) & 2 && ((CELL)at) < N_SWI_FUNCTORS*4+2)
|
||||
return SWI_Functors[((CELL)at)/4];
|
||||
if (IsAtomTerm(at))
|
||||
return (Functor)at;
|
||||
if ((CELL)(at) & 2)
|
||||
return SWI_Functors[((CELL)at)/4];
|
||||
return (Functor)at;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user