On Thu, Sep 13, 2001 at 05:50:06PM +0100, Simon Cozens wrote:
> On Thu, Sep 13, 2001 at 09:43:06AM -0700, Damien Neil wrote:
> > The language lawyer in me insists that I point out that this is
> > inherently nonportable.
>
> That as may be, Perl 5 runs on nearly 80 platforms and uses this
> trick.
But in some places Perl 5 has to use a similar union trick, too.
See struct xpvio in sv.h.
Also, the OS/400 Perl 5 port hasn't been integrated
(the only remaining port I think), one reason being
the extensive changes required because of the said
dirty trick. (I haven't seen the code myself but
IIRC basically IV had to become an union just like
suggested.)
> Is that portable enough for you?
>
> Simon
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen