On Tue, Dec 10, 2002 at 01:45:40PM -0500 Belinda M. Giardine wrote:
> Thanks, I think I know the problem now. I don't know how to phrase it
> correctly but I am trying to put a pointer from 1 array into another
> without making a copy. This makes it appear to work until I try to change
> the array. I just need to allocate a new string and put a pointer to it
> in the new array.
Do you perhaps mean a reference a l� Perl when you say pointer?
Something like:
push @arry, \@arry1;
This can be done relatively easy:
av_push(arry, newRV_inc((SV*) arry1));
Depending on your needs, you either need newRV_noinc() or newRV_inc() for
creating the reference. One bumps the reference count up while the other
one leaves it as it was.
Tassilo
--
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;