Dev.pm (PDL-2.080) | : | Dev.pm (PDL-2.081) | ||
---|---|---|---|---|
skipping to change at line 62 | skipping to change at line 62 | |||
# The INST are here still just in case we want to change something later. | # The INST are here still just in case we want to change something later. | |||
*PDL_INST_INCLUDE = \&PDL_INCLUDE; | *PDL_INST_INCLUDE = \&PDL_INCLUDE; | |||
*PDL_INST_TYPEMAP = \&PDL_TYPEMAP; | *PDL_INST_TYPEMAP = \&PDL_TYPEMAP; | |||
sub PDL_AUTO_INCLUDE { | sub PDL_AUTO_INCLUDE { | |||
my ($symname) = @_; | my ($symname) = @_; | |||
$symname ||= 'PDL'; | $symname ||= 'PDL'; | |||
return << "EOR"; | return << "EOR"; | |||
#include <pdlcore.h> | #include <pdlcore.h> | |||
static Core* $symname; /* Structure holds core C functions */ | static Core* $symname; /* Structure holds core C functions */ | |||
static SV* CoreSV; /* Gets pointer to perl var holding core structure */ | ||||
EOR | EOR | |||
} | } | |||
sub PDL_BOOT { | sub PDL_BOOT { | |||
my ($symname, $module) = @_; | my ($symname, $module) = @_; | |||
$symname ||= 'PDL'; | $symname ||= 'PDL'; | |||
$module ||= 'The code'; | $module ||= 'The code'; | |||
return << "EOR"; | return << "EOR"; | |||
perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */ | perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */ | |||
#ifndef aTHX_ | #ifndef aTHX_ | |||
#define aTHX_ | #define aTHX_ | |||
#endif | #endif | |||
if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); | if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV)); | |||
if (!(CoreSV = perl_get_sv("PDL::SHARE",FALSE))) /* SV* value */ | SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */ | |||
if (!CoreSV) | ||||
Perl_croak(aTHX_ "We require the PDL::Core module, which was not found"); | Perl_croak(aTHX_ "We require the PDL::Core module, which was not found"); | |||
if (!($symname = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */ | if (!($symname = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */ | |||
Perl_croak(aTHX_ "Got NULL pointer for $symname"); | Perl_croak(aTHX_ "Got NULL pointer for $symname"); | |||
if ($symname->Version != PDL_CORE_VERSION) | if ($symname->Version != PDL_CORE_VERSION) | |||
Perl_croak(aTHX_ "[$symname->Version: \%ld PDL_CORE_VERSION: \%ld XS_VERSIO N: \%s] $module needs to be recompiled against the newly installed PDL", (long i nt)$symname->Version, (long int)PDL_CORE_VERSION, XS_VERSION); | Perl_croak(aTHX_ "[$symname->Version: \%ld PDL_CORE_VERSION: \%ld XS_VERSIO N: \%s] $module needs to be recompiled against the newly installed PDL", (long i nt)$symname->Version, (long int)PDL_CORE_VERSION, XS_VERSION); | |||
EOR | EOR | |||
} | } | |||
use Cwd qw/abs_path/; | use Cwd qw/abs_path/; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |