Skip to content

Commit c26360c

Browse files
committed
fix Slices::indexND with an empty used as an lvalue - fix #535
1 parent 14fa999 commit c26360c

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- {and,or}over output type now same as input type (#533)
55
- add Ufunc::{b,}xorover (#533) - thanks @jo-37
66
- fix Math::polyroots crashing on [2 1 0 1] (#536) - thanks @pipatron for report
7+
- fix Slices::indexND with an empty used as an lvalue (#535) - thanks @yelnats for report
78

89
2.099 2025-01-23
910
- fix test that assumed acosh(0)->byte, i.e. nan()->byte, was always 0 (#514) - thanks @eserte for report

lib/PDL/Core.xs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ BOOT:
872872
/* modified from https://www.perlmonks.org/?node_id=849145 */
873873
char *package = "PDL";
874874
HV* stash = gv_stashpvn(package, strlen(package), TRUE);
875-
char *meths[] = { "sever", NULL }, **methsptr = meths;
875+
char *meths[] = { "sever", "new_from_specification", NULL }, **methsptr = meths;
876876
for (; *methsptr; methsptr++) {
877877
SV **meth = hv_fetch(stash, *methsptr, strlen(*methsptr), 0);
878878
if (!meth) croak("No found method '%s' in '%s'", *methsptr, package);

t/lvalue.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ my @lv_subs = map [$_], qw(
1010
dice flat indexND indexNDb broadcast nslice_if_pdl px range reorder reshape
1111
sever slice indexNDb mslice
1212
);
13+
push @lv_subs, map [$_, zeroes(indx,2,0)], qw(indexND);
1314
push @lv_subs, map [$_, 1], qw(clump dummy index unbroadcast);
1415
push @lv_subs, map [$_, pdl 1], qw(where whereND);
1516
push @lv_subs, map [$_, 0, 1], qw(diagonal);

0 commit comments

Comments
 (0)