ismall fixes to MPI interface.

This commit is contained in:
Vítor Santos Costa
2012-02-03 16:31:49 +00:00
parent ab33cacf7b
commit a2c86643b0
8 changed files with 62 additions and 88 deletions

View File

@@ -1168,7 +1168,7 @@ CELL *CellDifH(CELL *hptr, CELL *hlow)
return (CELL *)((char *)hptr-(char *)hlow);
}
#define AdjustSizeAtom(X) ((char *)(((CELL)X+7) & (CELL)(-8)))
#define AdjustSizeAtom(X) ((char *)(((CELL)(X)+(8-1)) & ~(8-1)))
static inline
Atom export_atom(Atom at, char **hpp, char *buf, size_t len)
@@ -1648,6 +1648,13 @@ Yap_ImportTerm(char * buf) {
return tret;
}
size_t
Yap_SizeOfExportedTerm(char * buf) {
CELL *bc = (CELL *)buf;
return bc[0]+bc[1]*sizeof(CELL);
}
#define DEBUG_IMPORT 1
#if DEBUG_IMPORT