diff --git a/mps/code/misc.h b/mps/code/misc.h index fb3a95a7174..a41dad3eb20 100644 --- a/mps/code/misc.h +++ b/mps/code/misc.h @@ -137,13 +137,14 @@ typedef const struct SrcIdStruct { /* PARENT -- parent structure * * Given a pointer to a field of a structure this returns a pointer to - * the main structure. PARENT(foo_t, x, foo->x) == foo. + * the main structure. PARENT(foo_t, x, &(foo->x)) == foo. * * This macro is thread-safe, see design.mps.misc.parent.thread-safe. * * That intermediate (void *) is required to stop some compilers complaining * about alignment of 'type *' being greater than that of 'char *'. Which - * is true, but not a bug, since p really is a pointer into a 'type' struct. + * is true, but not a bug, since the result really is a pointer to a 'type' + * struct. */ #define PARENT(type, field, p) \ diff --git a/mps/code/tract.c b/mps/code/tract.c index 7c9364a37f1..0bfb03e419d 100644 --- a/mps/code/tract.c +++ b/mps/code/tract.c @@ -22,7 +22,7 @@ static void ChunkDecache(Arena arena, Chunk chunk); /* TractArena -- get the arena of a tract */ -#define TractArena(seg) PoolArena(TractPool(tract)) +#define TractArena(tract) PoolArena(TractPool(tract)) /* TractCheck -- check the integrity of a tract */