"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Basic/Gen/PP.pm" between
PDL-2.078.tar.gz and PDL-2.079.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

PP.pm  (PDL-2.078):PP.pm  (PDL-2.079)
skipping to change at line 402 skipping to change at line 402
PRIV => sub {return "$sname->$_[0]"}, PRIV => sub {return "$sname->$_[0]"},
COMP => sub {return "$pname->$_[0]"}, COMP => sub {return "$pname->$_[0]"},
CROAK => sub {PDL::PP::pp_line_numbers(__LINE__-1, "return PDL->make_error (PDL_EUSERERROR, \"Error in $name:\" $_[0])")}, CROAK => sub {PDL::PP::pp_line_numbers(__LINE__-1, "return PDL->make_error (PDL_EUSERERROR, \"Error in $name:\" $_[0])")},
NAME => sub {return $name}, NAME => sub {return $name},
MODULE => sub {return $::PDLMOD}, MODULE => sub {return $::PDLMOD},
SETPDLSTATEBAD => sub { PDL::PP::pp_line_numbers(__LINE__-1, "$_[0]\->sta te |= PDL_BADVAL") }, SETPDLSTATEBAD => sub { PDL::PP::pp_line_numbers(__LINE__-1, "$_[0]\->sta te |= PDL_BADVAL") },
SETPDLSTATEGOOD => sub { PDL::PP::pp_line_numbers(__LINE__-1, "$_[0]\->sta te &= ~PDL_BADVAL") }, SETPDLSTATEGOOD => sub { PDL::PP::pp_line_numbers(__LINE__-1, "$_[0]\->sta te &= ~PDL_BADVAL") },
ISPDLSTATEBAD => \&badflag_isset, ISPDLSTATEBAD => \&badflag_isset,
ISPDLSTATEGOOD => sub {"!".badflag_isset($_[0])}, ISPDLSTATEGOOD => sub {"!".badflag_isset($_[0])},
BADFLAGCACHE => sub { PDL::PP::pp_line_numbers(__LINE__-1, "badflag_cac he") }, BADFLAGCACHE => sub { PDL::PP::pp_line_numbers(__LINE__-1, "badflag_cac he") },
PDLSTATESETBAD => sub { PDL::PP::pp_line_numbers(__LINE__-1, $sig->objs->{ PDLSTATESETBAD => sub { PDL::PP::pp_line_numbers(__LINE__-1, ($sig->objs->
$_[0]}->do_pdlaccess."->state |= PDL_BADVAL") }, {$_[0]}//confess "Can't get PDLSTATESETBAD for unknown ndarray '$_[0]'")->do_pdl
PDLSTATESETGOOD => sub { PDL::PP::pp_line_numbers(__LINE__-1, $sig->objs-> access."->state |= PDL_BADVAL") },
{$_[0]}->do_pdlaccess."->state &= ~PDL_BADVAL") }, PDLSTATESETGOOD => sub { PDL::PP::pp_line_numbers(__LINE__-1, ($sig->objs-
PDLSTATEISBAD => sub {badflag_isset($sig->objs->{$_[0]}->do_pdlaccess)}, >{$_[0]}->do_pdlaccess//confess "Can't get PDLSTATESETGOOD for unknown ndarray '
PDLSTATEISGOOD => sub {"!".badflag_isset($sig->objs->{$_[0]}->do_pdlaccess $_[0]'")."->state &= ~PDL_BADVAL") },
)}, PDLSTATEISBAD => sub {badflag_isset(($sig->objs->{$_[0]}//confess "Can't g
PP => sub { $sig->objs->{$_[0]}->do_physpointeraccess }, et PDLSTATEISBAD for unknown ndarray '$_[0]'")->do_pdlaccess)},
P => sub { (my $o = $sig->objs->{$_[0]})->{FlagPhys} = 1; $o->do_pointerac PDLSTATEISGOOD => sub {"!".badflag_isset(($sig->objs->{$_[0]}//confess "Ca
cess; }, n't get PDLSTATEISGOOD for unknown ndarray '$_[0]'")->do_pdlaccess)},
PDL => sub { $sig->objs->{$_[0]}->do_pdlaccess }, PP => sub { ($sig->objs->{$_[0]}//confess "Can't get PP for unknown ndarra
y '$_[0]'")->do_physpointeraccess },
P => sub { (my $o = ($sig->objs->{$_[0]}//confess "Can't get P for unknown
ndarray '$_[0]'"))->{FlagPhys} = 1; $o->do_pointeraccess; },
PDL => sub { ($sig->objs->{$_[0]}//confess "Can't get PDL for unknown ndar
ray '$_[0]'")->do_pdlaccess },
SIZE => sub { ($sig->ind_obj($_[0])//confess "Can't get SIZE of unknown di m '$_[0]'")->get_size }, SIZE => sub { ($sig->ind_obj($_[0])//confess "Can't get SIZE of unknown di m '$_[0]'")->get_size },
%PDL::PP::macros, %PDL::PP::macros,
); );
while (my ($before, $kw, $args, $other) = macro_extract($ret)) { while (my ($before, $kw, $args, $other) = macro_extract($ret)) {
confess("$kw not defined in '$ret'!") if !$syms{$kw}; confess("$kw not defined in '$ret'!") if !$syms{$kw};
$ret = join '', $before, $syms{$kw}->($args), $other; $ret = join '', $before, $syms{$kw}->($args), $other;
} }
$ret; $ret;
} }
skipping to change at line 1215 skipping to change at line 1215
# First the system typemaps.. # First the system typemaps..
my @tm = ($_rootdir.'../../../../lib/ExtUtils/typemap', my @tm = ($_rootdir.'../../../../lib/ExtUtils/typemap',
$_rootdir.'../../../lib/ExtUtils/typemap', $_rootdir.'../../../lib/ExtUtils/typemap',
$_rootdir.'../../lib/ExtUtils/typemap', $_rootdir.'../../lib/ExtUtils/typemap',
$_rootdir.'../../../typemap', $_rootdir.'../../../typemap',
$_rootdir.'../../typemap', $_rootdir.'../typemap', $_rootdir.'../../typemap', $_rootdir.'../typemap',
$_rootdir.'typemap'); $_rootdir.'typemap');
# Note that the OUTPUT typemap is unlikely to be of use here, but I have kept # Note that the OUTPUT typemap is unlikely to be of use here, but I have kept
# the source code from xsubpp for tidiness. # the source code from xsubpp for tidiness.
push @tm, &PDL::Core::Dev::PDL_TYPEMAP, 'typemap'; push @tm, &PDL::Core::Dev::PDL_TYPEMAP, '../../typemap', '../typemap', 'typema p';
carp "**CRITICAL** PP found no typemap in $_rootdir/typemap; this will cause p roblems..." carp "**CRITICAL** PP found no typemap in $_rootdir/typemap; this will cause p roblems..."
unless my @typemaps = grep -f $_ && -T _, @tm; unless my @typemaps = grep -f $_ && -T _, @tm;
foreach $typemap (@typemaps) { foreach $typemap (@typemaps) {
open(my $fh, $typemap) open(my $fh, $typemap)
or warn("Warning: could not open typemap file '$typemap': $!\n"), next; or warn("Warning: could not open typemap file '$typemap': $!\n"), next;
$mode = 'Typemap'; $mode = 'Typemap';
$junk = "" ; $junk = "" ;
$current = \$junk; $current = \$junk;
local $_; # else get "Modification of a read-only value attempted" local $_; # else get "Modification of a read-only value attempted"
while (<$fh>) { while (<$fh>) {
skipping to change at line 2086 skipping to change at line 2086
sub { sub {
(grep $_, @_[1..$#_]) ? PDL::PP::pp_line_numbers(__LINE__-1, "PDL_FREE_ CODE($_[0], destroy, $_[1], $_[2])"): ''}), (grep $_, @_[1..$#_]) ? PDL::PP::pp_line_numbers(__LINE__-1, "PDL_FREE_ CODE($_[0], destroy, $_[1], $_[2])"): ''}),
PDL::PP::Rule::Substitute::Usual->new("FreeCodeSubd", "FreeCodeNS"), PDL::PP::Rule::Substitute::Usual->new("FreeCodeSubd", "FreeCodeNS"),
PDL::PP::Rule::Returns::EmptyString->new("NewXSCoerceMustSubd"), PDL::PP::Rule::Returns::EmptyString->new("NewXSCoerceMustSubd"),
PDL::PP::Rule::MakeComp->new("NewXSCoerceMustCompNS", "NewXSCoerceMustSubd", "FOO"), PDL::PP::Rule::MakeComp->new("NewXSCoerceMustCompNS", "NewXSCoerceMustSubd", "FOO"),
PDL::PP::Rule::Substitute->new("NewXSCoerceMustCompSubd", "NewXSCoerceMustCom pNS"), PDL::PP::Rule::Substitute->new("NewXSCoerceMustCompSubd", "NewXSCoerceMustCom pNS"),
PDL::PP::Rule->new("NewXSFindBadStatusNS", "FindBadStatusCode", sub {@_}),
PDL::PP::Rule->new("NewXSFindBadStatusNS", ["StructName"], PDL::PP::Rule->new("NewXSFindBadStatusNS", ["StructName"],
"Rule to find the bad value status of the input ndarrays", "Rule to find the bad value status of the input ndarrays",
sub { sub {
PDL::PP::pp_line_numbers(__LINE__, <<EOF); PDL::PP::pp_line_numbers(__LINE__, <<EOF);
PDL_RETERROR(PDL_err, PDL->trans_check_pdls($_[0])); PDL_RETERROR(PDL_err, PDL->trans_check_pdls($_[0]));
char \$BADFLAGCACHE() = PDL->trans_badflag_from_inputs($_[0]); char \$BADFLAGCACHE() = PDL->trans_badflag_from_inputs($_[0]);
EOF EOF
}), }),
PDL::PP::Rule->new("NewXSCopyBadStatusNS", PDL::PP::Rule->new("NewXSCopyBadStatusNS",
 End of changes. 3 change blocks. 
13 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)