On Sun, Aug 08, 2004 at 08:01:52PM +0100, Nicholas Clark wrote:
> On Sun, Aug 08, 2004 at 10:46:20AM -0700, Jarkko Hietaniemi wrote:
> > # New Ticket Created by Jarkko Hietaniemi
> > # Please include the string: [perl #30995]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=30995 >
> >
> >
> > Anyone who thinks sizeof(int) == sizeof(long) == sizeof(*)
> > should now as a penance run ten times around the building, backwards.
There are further assumptions of this implicit in the pointer casts.
> not ok 13 - nci_i_i3
> # Failed test (t/pmc/nci.t at line 376)
> # got: '0
> # 20233590931463
> # '
> # expected: '42
> # 4711
> # '
static void
pcf_i_i3(Interp *interpreter, PMC *self)
{
typedef int (*func_t)(int, int *);
func_t pointer;
int return_data;
pointer = (func_t)D2FPTR(PMC_struct_val(self));
return_data = (int)(*pointer)((int)REG_INT(5),(int*)&PMC_int_val(REG_PMC(5)));
That ponter cast ISN'T going to work where sizeof(PMC_int_val) != sizeof(int)
I'm not sure where to start - there are probably a lot of these assumptions in
the code (which is generated anyway) so tonight when I'm hot, tired and
defrosting the fridge isn't a great time to start.
Nicholas Clark