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:
nethack.allison
2006-07-09 01:02:51 +00:00
parent 9c79bb2758
commit d611cd76c5
11 changed files with 108 additions and 104 deletions

View File

@@ -6,7 +6,7 @@
#define TIMEOUT_H
/* generic timeout function */
typedef void FDECL((*timeout_proc), (genericptr_t, long));
typedef void FDECL((*timeout_proc), (ANY_P *, long));
/* kind of timer */
#define TIMER_LEVEL 0 /* event specific to level */
@@ -38,7 +38,7 @@ typedef struct fe {
unsigned long tid; /* timer ID */
short kind; /* kind of use */
short func_index; /* what to call when we time out */
genericptr_t arg; /* pointer to timeout argument */
anything arg; /* pointer to timeout argument */
Bitfield (needs_fixup,1); /* does arg need to be patched? */
} timer_element;