Skip to content

Commit 329d695

Browse files
committed
nelem, unpdl need to physvaffine inputs
1 parent 55eabfc commit 329d695

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/PDL/Core.xs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,13 @@ datasv_refcount(p)
507507

508508
PDL_Indx
509509
nelem(x)
510-
pdl *x
511-
CODE:
512-
PDLDEBUG_f(printf("Core::nelem calling ")); pdl_barf_if_error(pdl_make_physdims(x));
513-
RETVAL = x->nvals;
514-
OUTPUT:
515-
RETVAL
510+
pdl *x
511+
CODE:
512+
pdl_barf_if_error(pdl_make_physvaffine( x ));
513+
PDLDEBUG_f(printf("Core::nelem calling ")); pdl_barf_if_error(pdl_make_physdims(x));
514+
RETVAL = x->nvals;
515+
OUTPUT:
516+
RETVAL
516517

517518

518519
# Call my howbig function
@@ -1363,6 +1364,7 @@ SV *
13631364
unpdl(x)
13641365
pdl *x
13651366
CODE:
1367+
pdl_barf_if_error(pdl_make_physvaffine( x ));
13661368
RETVAL = pdl2avref(x, 0);
13671369
OUTPUT:
13681370
RETVAL

0 commit comments

Comments
 (0)