File Coverage

lib/PDL/IO/Misc.xs
Criterion Covered Total %
statement 10 17 58.8
branch 5 12 41.6
condition n/a
subroutine n/a
pod n/a
total 15 29 51.7


line stmt bran cond sub pod time code
1              
2             #line 453 "lib/PDL/PP.pm"
3             /*
4             * THIS FILE WAS GENERATED BY PDL::PP from lib/PDL/IO/Misc.pd! Do not modify!
5             */
6              
7             #define PDL_FREE_CODE(trans, destroy, comp_free_code, ntpriv_free_code) \
8             if (destroy) { \
9             comp_free_code \
10             } \
11             if ((trans)->dims_redone) { \
12             ntpriv_free_code \
13             }
14              
15             #include "EXTERN.h"
16             #include "perl.h"
17             #include "XSUB.h"
18             #include "pdl.h"
19             #include "pdlcore.h"
20             #define PDL PDL_IO_Misc
21             extern Core* PDL; /* Structure hold core C functions */
22             #line 23 "lib/PDL/IO/Misc.xs"
23             pdl_error pdl_run_bswap2(pdl *x);
24             pdl_error pdl_run_bswap4(pdl *x);
25             pdl_error pdl_run_bswap8(pdl *x);
26             pdl_error pdl_run_bswap12(pdl *x);
27             pdl_error pdl_run_bswap16(pdl *x);
28             pdl_error pdl_run_bswap24(pdl *x);
29             pdl_error pdl_run_bswap32(pdl *x);
30             pdl_error pdl_run_rasc(pdl *nums,pdl *ierr,PerlIO *fp,IV num);
31              
32             #line 449 "lib/PDL/PP.pm"
33             #include "pdlperl.h"
34             #line 35 "lib/PDL/IO/Misc.xs"
35              
36             Core* PDL = NULL; /* Structure hold core C functions */
37              
38             MODULE = PDL::IO::Misc PACKAGE = PDL PREFIX=pdl_run_
39              
40             PROTOTYPES: DISABLE
41              
42              
43             void
44             pdl_run_bswap2(x)
45             pdl *x
46             PPCODE:
47 49           PDL->barf_if_error(pdl_run_bswap2(x));
48              
49             void
50             pdl_run_bswap4(x)
51             pdl *x
52             PPCODE:
53 5830           PDL->barf_if_error(pdl_run_bswap4(x));
54              
55             void
56             pdl_run_bswap8(x)
57             pdl *x
58             PPCODE:
59 64           PDL->barf_if_error(pdl_run_bswap8(x));
60              
61             void
62             pdl_run_bswap12(x)
63             pdl *x
64             PPCODE:
65 0           PDL->barf_if_error(pdl_run_bswap12(x));
66              
67             void
68             pdl_run_bswap16(x)
69             pdl *x
70             PPCODE:
71 0           PDL->barf_if_error(pdl_run_bswap16(x));
72              
73             void
74             pdl_run_bswap24(x)
75             pdl *x
76             PPCODE:
77 0           PDL->barf_if_error(pdl_run_bswap24(x));
78              
79             void
80             pdl_run_bswap32(x)
81             pdl *x
82             PPCODE:
83 0           PDL->barf_if_error(pdl_run_bswap32(x));
84              
85             void
86             _rasc_int(nums,ierr,fp,num)
87             pdl *nums
88             pdl *ierr
89             PerlIO *fp
90             IV num
91             CODE:
92 2           PDL->barf_if_error(pdl_run_rasc(nums,ierr,fp,num));
93              
94              
95             #line 483 "lib/PDL/PP.pm"
96             BOOT:
97             /* Get pointer to structure of core shared C routines */
98             /* make sure PDL::Core is loaded */
99             #line 100 "lib/PDL/IO/Misc.xs"
100 22           perl_require_pv ("PDL/Core.pm"); /* make sure PDL::Core is loaded */
101             #ifndef aTHX_
102             #define aTHX_
103             #endif
104 22 50         if (SvTRUE (ERRSV)) Perl_croak(aTHX_ "%s",SvPV_nolen (ERRSV));
    50          
    0          
105 22           SV* CoreSV = perl_get_sv("PDL::SHARE",FALSE); /* var with core structure */
106 22 50         if (!CoreSV)
107 0           Perl_croak(aTHX_ "We require the PDL::Core module, which was not found");
108 22 50         if (!(PDL = INT2PTR(Core*,SvIV( CoreSV )))) /* Core* value */
109 0           Perl_croak(aTHX_ "Got NULL pointer for PDL");
110 22 50         if (PDL->Version != PDL_CORE_VERSION)
111 0           Perl_croak(aTHX_ "[PDL->Version: %ld PDL_CORE_VERSION: %ld XS_VERSION: %s] PDL::IO::Misc needs to be recompiled against the newly installed PDL", (long int)PDL->Version, (long int)PDL_CORE_VERSION, XS_VERSION);