fix interfacey

This commit is contained in:
Vitor Santos Costa 2010-06-30 13:18:15 +02:00
parent 1b16a3d909
commit 6619bd44b0

View File

@ -167,8 +167,8 @@ SWIFunctorToFunctor(functor_t at)
{ {
if (IsAtomTerm(at)) if (IsAtomTerm(at))
return (Functor)at; return (Functor)at;
if ((CELL)(at) & 1) if ((CELL)(at) & 2)
return SWI_Functors[((CELL)at)/2]; return SWI_Functors[((CELL)at)/4];
return (Functor)at; return (Functor)at;
} }
@ -181,7 +181,7 @@ Yap_InitSWIHash(void)
add_to_hash(i*2+1, (ADDR)SWI_Atoms[i]); add_to_hash(i*2+1, (ADDR)SWI_Atoms[i]);
} }
for (j=0; j < N_SWI_FUNCTORS; j++) { for (j=0; j < N_SWI_FUNCTORS; j++) {
add_to_hash((((CELL)(j))*2+1), (ADDR)SWI_Functors[j]); add_to_hash((((CELL)(j))*4+2), (ADDR)SWI_Functors[j]);
} }
} }