----- Original Message -----
From: "Chris Marshall" <[email protected]>
To: "Sisyphus" <[email protected]>
Cc: "[email protected]" <[email protected]>
Sent: Saturday, February 25, 2012 1:53 AM
Subject: Re: [Perldl] question about use64bitall perl
The specific question is about the internal perl
array index type as exposed by the perlapi. E.g.,
SV* av_delete(AV *av, I32 key, I32 flags)
bool av_exists(AV *av, I32 key)
void av_extend(AV *av, I32 key)
SV** av_fetch(AV *av, I32 key, I32 lval)
void av_fill(AV *av, I32 fill)
I32 av_len(const AV *av)
....
where you can see the I32 type everywhere. I
found no instance where it is not I32 in my
perldoc searches nor in my various google
attempts.
Which then raises the question "What is sizeof(I32) ?".
I see this in my config.h:
/* I32SIZE:
* This symbol contains the sizeof(I32).
*/
which suggests that it might not be guaranteed to be 32 bits.
Simplest way to find out (as suggested by David) is to ask p5p "Under what
(if any) circumstances will the sizeof(I32) be other than 4 ?".
The answer could also be found in the perl sources, if one knew where to
look. It would be a matter of working through the procedure that determines
what I32TYPE (which is later typedef'd to I32) is set to.
Looking at Ingo's 'perl -V' it seems that *some* trouble is taken to find a
32-bit type - I deduce that 'long' is rejected as it's 64 bits, so 'int' is
presumably selected. Ingo, does your CORE/config.h report that I32TYPE is
int ?
If 'int' had also been 64-bits, would 'short' then have been considered ?
And if none of 'short', 'int', 'long' are 32-bits, what happens then ?
Interesting stuff :-)
Cheers,
Rob
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl