@@ -371,10 +371,6 @@ sub dosubst_private {
371371 CROAK => sub {" return PDL->make_error(PDL_EUSERERROR, \" Error in $name :\" @{[join ',', @_ ]})" },
372372 NAME => sub {return $name },
373373 MODULE => sub {return $: :PDLMOD},
374- SETPDLSTATEBAD => sub { " $_ [0]\- >state |= PDL_BADVAL" },
375- SETPDLSTATEGOOD => sub { " $_ [0]\- >state &= ~PDL_BADVAL" },
376- ISPDLSTATEBAD => \&badflag_isset,
377- ISPDLSTATEGOOD => sub {" !" .badflag_isset($_ [0])},
378374 BADFLAGCACHE => sub { " badflag_cache" },
379375 PDLSTATESETBAD => sub { ($sig -> objs-> {$_ [0]}//confess " Can't get PDLSTATESETBAD for unknown ndarray '$_ [0]'" )-> do_pdlaccess." ->state |= PDL_BADVAL" },
380376 PDLSTATESETGOOD => sub { ($sig -> objs-> {$_ [0]}-> do_pdlaccess//confess " Can't get PDLSTATESETGOOD for unknown ndarray '$_ [0]'" )." ->state &= ~PDL_BADVAL" },
@@ -1180,10 +1176,10 @@ $PDL::PP::deftbl =
11801176 PDL::PP::Rule::Returns-> new(" Doc" , [], ' Sets the default doc string' ,
11811177 " \n =for ref\n\n info not available\n " ),
11821178
1183- PDL::PP::Rule-> new(" BadDoc" , [qw( BadFlag Name CopyBadStatusCode? ) ],
1179+ PDL::PP::Rule-> new(" BadDoc" , [qw( BadFlag Name) ],
11841180 ' Sets the default documentation for handling of bad values' ,
11851181 sub {
1186- my ($bf , $name , $code ) = @_ ;
1182+ my ($bf , $name ) = @_ ;
11871183 my $str ;
11881184 if ( not defined ($bf ) ) {
11891185 $str = " C<$name > does not process bad values.\n " ;
@@ -1192,14 +1188,8 @@ $PDL::PP::deftbl =
11921188 } else {
11931189 $str = " C<$name > ignores the bad-value flag of the input ndarrays.\n " ;
11941190 }
1195- if ( not defined ($code ) ) {
1196- $str .= " It will set the bad-value flag of all output ndarrays if " .
1197- " the flag is set for any of the input ndarrays.\n " ;
1198- } elsif ( $code eq ' ' ) {
1199- $str .= " The output ndarrays will NOT have their bad-value flag set.\n " ;
1200- } else {
1201- $str .= " The state of the bad-value flag of the output ndarrays is unknown.\n " ;
1202- }
1191+ $str .= " It will set the bad-value flag of all output ndarrays if " .
1192+ " the flag is set for any of the input ndarrays.\n " ;
12031193 }
12041194 ),
12051195
@@ -1957,15 +1947,6 @@ char \$BADFLAGCACHE() = PDL->trans_badflag_from_inputs($_[0]); (void)\$BADFLAGCA
19571947EOF
19581948 }),
19591949
1960- PDL::PP::Rule-> new(" NewXSCopyBadStatusNS" ,
1961- [" CopyBadStatusCode" ],
1962- " Use CopyBadStatusCode if given" ,
1963- sub {
1964- my ($badcode ) = @_ ;
1965- confess " PDL::PP ERROR: CopyBadStatusCode contains '\$ PRIV(bvalflag)'; replace with \$ BADFLAGCACHE()"
1966- if $badcode =~ m /\$ PRIV(bvalflag)/ ;
1967- $badcode ;
1968- }),
19691950 PDL::PP::Rule-> new(" NewXSCopyBadStatusNS" ,
19701951 [" SignatureObj" ],
19711952 " Rule to copy the bad value status to the output ndarrays" ,
@@ -1977,7 +1958,7 @@ EOF
19771958 return ' ' if @{$sig -> names} == (my @outs = $sig -> names_out); # no input pdls, no badflag copying needed
19781959 !@outs ? ' ' : PDL::PP::indent(2, join ' ' , # no outs, ditto
19791960 " if (\$ BADFLAGCACHE()) {\n " ,
1980- (map " \$ SETPDLSTATEBAD( $_ ) ;\n " , @outs ),
1961+ (map " $_ ->state |= PDL_BADVAL ;\n " , @outs ),
19811962 " }\n " );
19821963 }),
19831964
0 commit comments