Re: Can't pack literals as pointers
authorJohn Tobey <jtobey@user1.channel1.com>
Tue, 24 Jun 1997 11:44:33 +0000 (23:44 +1200)
committerTim Bunce <Tim.Bunce@ig.co.uk>
Wed, 6 Aug 1997 12:00:00 +0000 (00:00 +1200)
commit72dbcb4b16ba8abae7db52f83482564e4d62acc4
treec6f9319a426174a48a358f6bbe7d1d6d80693904
parent1b1626e441fa9750f3953e46530f2e95046bb007
Re: Can't pack literals as pointers

MHO, pack("p","foo") should evaluate to a pointer that's valid in the
urrent context.  pack("p",undef) should return the NULL value.
urrently, they both produce the error "Modification of a read-only
alue attempted".

This looks pretty easy to fix, so I've prepared a diff against the
5.004_01 distribution.  This tests fine on my Linux.  I hope I'm not
introducing a memory leak or other ailment...

Credited: Tim Bunce <Tim.Bunce@ig.co.uk>
Credited: Gurusamy Sarathy <gsar@engin.umich.edu>
pp.c