more SWI compatibility changes.

This commit is contained in:
Vítor Santos Costa
2011-02-11 01:22:07 +00:00
parent 02c791fc3d
commit b475be5692
7 changed files with 22 additions and 17 deletions

View File

@@ -222,6 +222,9 @@ _PL_unify_atomic(term_t t, PL_atomic_t a)
word lookupAtom(const char *s, size_t len)
{
/* dirty trick to ensure s is null terminated */
char *st = (char *)s;
st[len] = '\0';
if (len >= strlen(s)) {
return (word)YAP_LookupAtom(s);
} else {