Subject: | Bug in PDL::Callext? |
Hi,
this is regarding PDL-2.3.3, perl-5.8.0, Linux (RedHeat 7.2):
The test of callext fails with a "barf" at line 151. This is
because dl_load_file on my system returns an empty string,
which however is a "defined" value. After changing the code
like this (see below), the test succeeded.
Hope this helps,
Marek
sub callext{
die "Usage: callext(\$file,\$symbol, \@pdl_args)" if scalar(@_)<2;
my($file,$symbol, @pdl_args) = @_;
my $libref = DynaLoader::dl_load_file($file);
my $err = DynaLoader::dl_error(); barf $err if $err;
my $symref = DynaLoader::dl_find_symbol($libref, $symbol);
$err = DynaLoader::dl_error(); barf $err if $err;
_callext_int($symref, @pdl_args);
1;}