[svn:parrot] r45094 - in branches/shallow_clone: src t/pmc

plobsing at svn.parrot.org plobsing at svn.parrot.org
Mon Mar 22 04:06:13 UTC 2010


Author: plobsing
Date: Mon Mar 22 04:05:51 2010
New Revision: 45094
URL: https://trac.parrot.org/parrot/changeset/45094

Log:
make parrot_hash_clone shallow

Modified:
   branches/shallow_clone/src/hash.c
   branches/shallow_clone/t/pmc/hash.t

Modified: branches/shallow_clone/src/hash.c
==============================================================================
--- branches/shallow_clone/src/hash.c	Mon Mar 22 03:36:53 2010	(r45093)
+++ branches/shallow_clone/src/hash.c	Mon Mar 22 04:05:51 2010	(r45094)
@@ -1419,7 +1419,7 @@
             if (PMC_IS_NULL((PMC *)b->value))
                 valtmp = (void *)PMCNULL;
             else
-                valtmp = (void *)VTABLE_clone(interp, (PMC*)b->value);
+                valtmp = b->value;
             break;
 
           default:

Modified: branches/shallow_clone/t/pmc/hash.t
==============================================================================
--- branches/shallow_clone/t/pmc/hash.t	Mon Mar 22 03:36:53 2010	(r45093)
+++ branches/shallow_clone/t/pmc/hash.t	Mon Mar 22 04:05:51 2010	(r45094)
@@ -566,7 +566,7 @@
     set $P1["a"], "A"
 
     # $P0 = { a => "a", b => [undef, undef, undef], c => 4 }
-    # $P1 = { a => "A", b => [undef, undef] }
+    # $P1 = { a => "A", b => [undef, undef, undef] }
 
     set $S0, $P0["a"]
     is( $S0, "a", 'original hash lookup pre-clone value' )
@@ -583,7 +583,7 @@
 
     set $P5, $P1["b"]
     set $I0, $P5
-    is( $I0, 2, 'cloned hash lookup pre-clone complex value' )
+    is( $I0, 3, 'cloned hash lookup pre-clone complex value' )
 
 # XXX: this should return undef or something, but it dies instead.
 #     set $P3, $P0["c"]


More information about the parrot-commits mailing list