FPTR2DPTR in perl.h is defined as (t)PTR2UV(p) if UVSIZE > PTRSIZE this gives a compiler warning.
We could use INT2PTR(t,PTR2UV(p)) but this could expand to (t)(unsigned long)(UV)(unsigned long)(p) which is a bit unnecessary. What is needed is an unsigned integer the same size as a pointer. We already have this (PTRV)! Robin --- /perl-current/perl.h +++ perl.h Mon Jun 20 13:35:08 2005 @@ -1514,8 +1514,8 @@ * The only feasible use is probably temporarily storing * function pointers in a data pointer (such as a void pointer). */ -#define DPTR2FPTR(t,p) ((t)PTR2UV(p)) /* data pointer to function pointer */ -#define FPTR2DPTR(t,p) ((t)PTR2UV(p)) /* function pointer to data pointer */ +#define DPTR2FPTR(t,p) ((t)(PTRV)(p)) /* data pointer to function pointer */ +#define FPTR2DPTR(t,p) ((t)(PTRV)(p)) /* function pointer to data pointer */ #ifdef USE_LONG_DOUBLE # if defined(HAS_LONG_DOUBLE) && LONG_DOUBLESIZE == DOUBLESIZE ------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Serco House, 16 Bartley Wood Business Park, Hook, Hampshire, United Kingdom RG27 9UY -------------------------------------------------------------------