remove pointer to long conversions - part 1 of 3 (trunk only)

P64 (Win64) has a 64 bit pointer size, but a 32 bit long size.
Remove some code that forced pointers into a long int, and
vice versa where information could be lost.

This part deals with light source functions and their
arguments mostly, and switches some arguments
from type genericptr_t to 'anything'.
This commit is contained in:
nethack.allison
2006-07-08 18:24:01 +00:00
parent dbc3abb226
commit 699330928d
8 changed files with 102 additions and 47 deletions

View File

@@ -1311,7 +1311,7 @@ register struct monst *mtmp, *mtmp2;
/* since this is so rare, we don't have any `mon_move_light_source' */
new_light_source(mtmp2->mx, mtmp2->my,
emits_light(mtmp2->data),
LS_MONSTER, (genericptr_t)mtmp2);
LS_MONSTER, monst_to_any(mtmp2));
/* here we rely on the fact that `mtmp' hasn't actually been deleted */
del_light_source(LS_MONSTER, (genericptr_t)mtmp);
}
@@ -2623,7 +2623,7 @@ boolean msg; /* "The oldmon turns into a newmon!" */
del_light_source(LS_MONSTER, (genericptr_t)mtmp);
if (emits_light(mtmp->data))
new_light_source(mtmp->mx, mtmp->my, emits_light(mtmp->data),
LS_MONSTER, (genericptr_t)mtmp);
LS_MONSTER, monst_to_any(mtmp));
}
if (!mtmp->perminvis || pm_invisible(olddata))
mtmp->perminvis = pm_invisible(mdat);