CallExt.xs (PDL-2.080) | : | CallExt.xs (PDL-2.081) | ||
---|---|---|---|---|
skipping to change at line 13 | skipping to change at line 13 | |||
* but it has been hand-modified since then. | * but it has been hand-modified since then. | |||
*/ | */ | |||
#include "EXTERN.h" | #include "EXTERN.h" | |||
#include "perl.h" | #include "perl.h" | |||
#include "XSUB.h" | #include "XSUB.h" | |||
#include "pdl.h" | #include "pdl.h" | |||
#include "pdlcore.h" | #include "pdlcore.h" | |||
#include "pdlsimple.h" | #include "pdlsimple.h" | |||
static Core* PDL; /* Structure hold core C functions */ | static Core* PDL; /* Structure hold core C functions */ | |||
SV* CoreSV; /* Get's pointer to perl var holding core structure */ | ||||
/* | /* | |||
* Call an external C routine loaded dynamically - pass PDL args list | * Call an external C routine loaded dynamically - pass PDL args list | |||
* | * | |||
* Not sure whether should be 'ENABLE' or 'DISABLE' for the PROTOTYPES | * Not sure whether should be 'ENABLE' or 'DISABLE' for the PROTOTYPES | |||
* argument below. We only seem to need the line to stop perl from | * argument below. We only seem to need the line to stop perl from | |||
* complaining about the line being missing during build time anyway. | * complaining about the line being missing during build time anyway. | |||
*/ | */ | |||
MODULE = PDL::CallExt PACKAGE = PDL::CallExt | MODULE = PDL::CallExt PACKAGE = PDL::CallExt | |||
skipping to change at line 61 | skipping to change at line 60 | |||
i = (*symref)(npdl, x); | i = (*symref)(npdl, x); | |||
if (i==0) | if (i==0) | |||
barf("Error calling external routine"); | barf("Error calling external routine"); | |||
for(i=0; i<npdl; i++) /* Free stuff */ | for(i=0; i<npdl; i++) /* Free stuff */ | |||
Safefree(x[i]); | Safefree(x[i]); | |||
Safefree(x); | Safefree(x); | |||
BOOT: | BOOT: | |||
/* Get pointer to structure of core shared C routines */ | /* Get pointer to structure of core shared C routines */ | |||
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 (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */ | if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */ | |||
Perl_croak(aTHX_ "Got NULL pointer for PDL"); | Perl_croak(aTHX_ "Got NULL pointer for PDL"); | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |