Re: PerlHash.get_pmc_keyed of non existing key

2003-08-24 Thread Leopold Toetsch
Nicholas Clark wrote: So I assume, that the returned PerlUndef should be put into the aggregate, if there was none before access. I believe yes, it must, for consistency. Is there an op to copy the value out of an aggregate, without changing the aggregate? The (shallow copy) value assignment, nee

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-23 Thread Nicholas Clark
Having read the whole thread a few times, I think I understand the question. On Fri, Aug 22, 2003 at 10:16:33AM +0200, Leopold Toetsch wrote: > Benjamin Goldberg <[EMAIL PROTECTED]> wrote: > >> (PMCs have reference semantics[1]) > > I should have started with [1]: > > new P1, .PerlHash > # n

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-22 Thread Gordon Henriksen
On Friday, August 22, 2003, at 02:52 , Leopold Toetsch wrote: Gordon Henriksen wrote: (PMCs have reference semantics[1]) Isn't that the job of Perl's \ operator? Did you read on to [1] too? I read [1] new P1, .PerlHash new P3, .PerlString set P3, "yyy\n" set P1["a"], P3 set P0, P1["a"]

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-22 Thread Leopold Toetsch
Gordon Henriksen wrote: (PMCs have reference semantics[1]) Isn't that the job of Perl's \ operator? Did you read on to [1] too? leo

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-22 Thread Leopold Toetsch
Benjamin Goldberg <[EMAIL PROTECTED]> wrote: >> (PMCs have reference semantics[1]) I should have started with [1]: new P1, .PerlHash # new P3, .PerlString # set P3, "yyy\n" # set P1["a"], P3 set P0, P1["a"] print P0 set P0, "xxx\n" set P2, P1["a"] print P2 end When the hash e

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-22 Thread Gordon Henriksen
On Thursday, August 21, 2003, at 11:50 , Leopold Toetsch wrote: IMHO is $a = \$h{"a"}; print $$a; $$a = "xxx\n"; $a = $h{"a"}; print $a; the same as: new P1, .PerlHash set P0, P1["a"] print P0 set P0, "xxx\n" set P2, P1["a"] print P2 end (PMCs have reference semantics[1])

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-21 Thread Benjamin Goldberg
Leopold Toetsch wrote: > > IMHO is > >$a = \$h{"a"}; >print $$a; >$$a = "xxx\n"; >$a = $h{"a"}; >print $a; > > the same as: > >new P1, .PerlHash >set P0, P1["a"] >print P0 >set P0, "xxx\n" >set P2, P1["a"] >print P2 >end > > (PMCs have referenc

PerlHash.get_pmc_keyed of non existing key

2003-08-21 Thread Leopold Toetsch
IMHO is $a = \$h{"a"}; print $$a; $$a = "xxx\n"; $a = $h{"a"}; print $a; the same as: new P1, .PerlHash set P0, P1["a"] print P0 set P0, "xxx\n" set P2, P1["a"] print P2 end (PMCs have reference semantics[1]) Shouldn't that print "xxx" as perl5 does? I.e. store the returne