remove pointer to long conversions - part 2 of 3 (trunk only)
Remove some more code that forced pointers into a long int, and vice versa where information could be lost (P64 platforms such as WIN64 have a 64 bit pointer size, but a 32 bit long size.) This 2nd part deals with timeout functions switching some arguments from type genericptr_t to 'anything'. Like part 1, this needs to increment EDITLEVEL in patchlevel.h.
This commit is contained in:
@@ -1702,10 +1702,10 @@ struct obj *obj;
|
||||
*/
|
||||
void
|
||||
fig_transform(arg, timeout)
|
||||
genericptr_t arg;
|
||||
anything *arg;
|
||||
long timeout;
|
||||
{
|
||||
struct obj *figurine = (struct obj *)arg;
|
||||
struct obj *figurine = arg->a_obj;
|
||||
struct monst *mtmp;
|
||||
coord cc;
|
||||
boolean cansee_spot, silent, okay_spot;
|
||||
@@ -1729,7 +1729,7 @@ long timeout;
|
||||
!figurine_location_checks(figurine,&cc, TRUE)) {
|
||||
/* reset the timer to try again later */
|
||||
(void) start_timer((long)rnd(5000), TIMER_OBJECT,
|
||||
FIG_TRANSFORM, (genericptr_t)figurine);
|
||||
FIG_TRANSFORM, obj_to_any(figurine));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1880,7 +1880,7 @@ struct obj **optr;
|
||||
"toss the figurine into the air" :
|
||||
"set the figurine on the ground"));
|
||||
(void) make_familiar(obj, cc.x, cc.y, FALSE);
|
||||
(void) stop_timer(FIG_TRANSFORM, (genericptr_t)obj);
|
||||
(void) stop_timer(FIG_TRANSFORM, obj_to_any(obj));
|
||||
useup(obj);
|
||||
*optr = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user