Skip to content

Commit

Permalink
error if undefined values to PDL constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Oct 24, 2024
1 parent db72e96 commit 14177b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Basic/Core/Core.xs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ new_from_specification(invoc, ...)
XSRETURN(1);
}
}
IV i; for (i = 0; i < items; i++)
if (!SvOK(ST(i)))
barf("Arg %"IVdf" is undefined", i);
IV argstart = 1, type = PDL_D;
if (items > 1 && sv_derived_from(ST(1), "PDL::Type")) {
argstart++;
Expand Down
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- get_dataref now works even with DONTTOUCHDATA which is really about allocation
- if $pdl->{PDL} is code ref, $pdl now passed as arg
- add PDL::Hash to simplify hash-based PDL subclasses
- now an error to pass any undefined values to PDL constructors

2.093 2024-09-29
- PDL.set_datatype now doesn't physicalise input, PDL.convert_type does
Expand Down

0 comments on commit 14177b7

Please sign in to comment.