Skip to content

Commit

Permalink
make_physvaffine to READDATA_VAFFINE if DATACHANGED
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Mar 2, 2024
1 parent b6824a0 commit d2f7be6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion Basic/Core/pdlapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,10 @@ pdl_error pdl__make_physvaffine_recprotect(pdl *it, int recurse_count)
it->vafftrans->from = current;
it->state |= PDL_OPT_VAFFTRANSOK;
PDLDEBUG_f(printf("make_physvaffine exit %p, physicalising final parent=%p\n", it, current));
return pdl__make_physical_recprotect(current, recurse_count+1);
PDL_RETERROR(PDL_err, pdl__make_physical_recprotect(current, recurse_count+1));
if (it->state & PDL_PARENTDATACHANGED)
READDATA_VAFFINE(PDL_RETERROR, it, recurse_count);
return PDL_err;
}

pdl_error pdl_make_physvaffine(pdl *it)
Expand Down
16 changes: 8 additions & 8 deletions t/slice.t
Original file line number Diff line number Diff line change
Expand Up @@ -324,21 +324,21 @@ vafftest($all, [[0,1,1],[0,0,1],[1,0,0]], "vaff physicalised");
$vaff2 += 1;
vafftest($all, [[1,1,1],[0,0,1],[1,0,0]], "vaff2 mutated");
$vaff->make_physvaffine;
vafftest($all, [[1,1,1],[0,0,1],[1,0,0]], "vaff physvaffined");
vafftest($all, [[0,1,1],[0,0,1],[1,0,0]], "vaff physvaffined");
$clumped++;
vafftest($all, [[1,1,1],[0,1,1],[0,1,0]], "clumped mutated");
vafftest($all, [[1,1,1],[1,1,1],[1,1,0]], "clumped mutated");
$root->set(0,0,7);
vafftest($all, [[1,1,1],[0,1,1],[0,1,0]], "root set()ed");
vafftest($all, [[1,1,1],[1,1,1],[1,1,0]], "root set()ed");
$vaff->make_physvaffine;
vafftest($all, [[1,1,1],[0,1,1],[0,1,0]], "vaff physvaffined");
vafftest($all, [[0,1,1],[1,1,1],[1,1,0]], "vaff physvaffined");
$vaff2->make_physvaffine;
vafftest($all, [[1,1,1],[0,1,1],[0,1,0]], "vaff2 physvaffined");
vafftest($all, [[0,1,1],[0,1,1],[1,1,0]], "vaff2 physvaffined");
$clumped->make_physvaffine;
vafftest($all, [[1,1,1],[0,1,1],[0,1,0]], "clumped physvaffined");
vafftest($all, [[0,1,1],[0,1,1],[0,1,0]], "clumped physvaffined");
push @$all, [my $latevaff=$vaff2->slice(''), 'latevaff'];
vafftest($all, [[1,1,1],[0,1,1],[0,1,0],[0,0,0]], "latevaff created");
vafftest($all, [[0,1,1],[0,1,1],[0,1,0],[0,0,0]], "latevaff created");
$latevaff->make_physvaffine;
vafftest($all, [[1,1,1],[0,1,1],[0,1,0],[0,0,1]], "latevaff physvaffined");
vafftest($all, [[0,1,1],[0,1,1],[0,1,0],[0,0,1]], "latevaff physvaffined");
is $latevaff->vaffine_from, $root->address, 'latevaff vaffine_from root';

# capturing GH#461
Expand Down

0 comments on commit d2f7be6

Please sign in to comment.