Permalink
Browse files

handle non-recursive root objects

  • Loading branch information...
1 parent bc49cf6 commit a8348a0614fdb9cf8bbf778c935f191d4e7455e7 @plobsing committed Aug 8, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/deepclone.winxed
View
@@ -71,8 +71,8 @@ class DeepClone {
self.str_queue = new 'ResizableStringArray'();
self.pmc_queue = new 'ResizablePMCArray'();
- var todo = self.todo;
- ${ push todo, orig };
+ self.push_pmc(orig); // create dup of root
+ self.shift_pmc(); // reset queue
}
function get_pmc[vtable] () {
@@ -118,7 +118,7 @@ class DeepClone {
dup = null;
}
else {
- int addr = nci['pmc_addr'](v);
+ int addr = nci['pmc_addr'](v);
dup = self.seen[addr];
${ isnull nullp, dup };
if (nullp) {

0 comments on commit a8348a0

Please sign in to comment.