fix scanning for operators.
This commit is contained in:
parent
d8b5a0e5d5
commit
fee0ee8691
13
C/adtdefs.c
13
C/adtdefs.c
@ -492,6 +492,7 @@ Yap_GetOpProp(Atom a, op_type type USES_REGS)
|
|||||||
{ /* look property list of atom a for kind */
|
{ /* look property list of atom a for kind */
|
||||||
AtomEntry *ae = RepAtom(a);
|
AtomEntry *ae = RepAtom(a);
|
||||||
PropEntry *pp;
|
PropEntry *pp;
|
||||||
|
OpEntry *oinfo = NULL;
|
||||||
|
|
||||||
READ_LOCK(ae->ARWLock);
|
READ_LOCK(ae->ARWLock);
|
||||||
pp = RepProp(ae->PropsOfAE);
|
pp = RepProp(ae->PropsOfAE);
|
||||||
@ -523,10 +524,22 @@ Yap_GetOpProp(Atom a, op_type type USES_REGS)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* if it is not the latest module */
|
||||||
|
if (info->OpModule == PROLOG_MODULE) {
|
||||||
|
/* cannot commit now */
|
||||||
|
oinfo = info;
|
||||||
|
pp = RepProp(pp->NextOfPE);
|
||||||
|
} else {
|
||||||
READ_LOCK(info->OpRWLock);
|
READ_LOCK(info->OpRWLock);
|
||||||
READ_UNLOCK(ae->ARWLock);
|
READ_UNLOCK(ae->ARWLock);
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (oinfo) {
|
||||||
|
READ_LOCK(oinfo->OpRWLock);
|
||||||
|
READ_UNLOCK(ae->ARWLock);
|
||||||
|
return oinfo;
|
||||||
|
}
|
||||||
READ_UNLOCK(ae->ARWLock);
|
READ_UNLOCK(ae->ARWLock);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user