Skip to content

Commit

Permalink
add bvalflag reporting to pdlutil and pdump_trans - #517
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Jan 8, 2025
1 parent 6b3e780 commit ce237c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/PDL/Core.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2230,6 +2230,7 @@ sub pdump_trans {
my $vtable = $trans->vtable;
my @lines = (
"State: ${\join '|', $trans->flags}",
"bvalflag: ${\$trans->bvalflag}",
"vtable flags: ${\join '|', $vtable->flags}",
);
my @ins = $trans->parents;
Expand Down
8 changes: 8 additions & 0 deletions lib/PDL/Core.xs
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,14 @@ address(self)
OUTPUT:
RETVAL

IV
bvalflag(x)
pdl_trans *x
CODE:
RETVAL = x->bvalflag;
OUTPUT:
RETVAL

void
flags(x)
pdl_trans *x
Expand Down
1 change: 1 addition & 0 deletions lib/PDL/Core/pdlutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ void pdl_dump_trans_fixspace (pdl_trans *it, int nspac) {
SET_SPACE(spaces, nspac);
printf("%sDUMPTRANS %p (%s)\n%s Flags: ",spaces,it,it->vtable->name,spaces);
pdl_dump_flags_fixspace(it->flags,nspac+3, PDL_FLAGS_TRANS);
printf("%s bvalflag: %d\n",spaces,it->bvalflag);
printf("%s vtable flags ",spaces);
pdl_dump_flags_fixspace(it->vtable->flags,nspac+3,PDL_FLAGS_VTABLE);
if(it->flags & PDL_ITRANS_ISAFFINE) {
Expand Down

0 comments on commit ce237c4

Please sign in to comment.