lib/Bio/PhyloXS/Matrices/Character.xs

filter: Statementstmt 0.0% 0 / 25 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 29 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« lib/Bio/PhyloXS/Listable.xs ↑ Summary lib/Bio/PhyloXS/Matrices/Characters.xs »
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4  
5 # include "src/Character.h"
6 # include "src/TypeSafeData.h"
7 # include "src/types.h"
8  
9 0 Character* create(const char * classname) {
10 Character *self;
11 0 Newx(self,1,Character);
12 0 initialize_character(self);
13 0 return self;
14 }
15  
16 0 void initialize_character(Character* self){
17 0 initialize_typesafedata((TypeSafeData*)self);
18 0 ((Identifiable*)self)->_type = _CHARACTER_;
19 0 ((Identifiable*)self)->_container = _CHARACTERS_;
20 0 ((Identifiable*)self)->_index = _CHARACTER_IDX_;
21 0 }
22  
23 0 void destroy_character(Character* self){
24 0 destroy_typesafedata((TypeSafeData*)self);
25 //Safefree(self);
26 0 }
27 MODULE = Bio::PhyloXS::Matrices::Character PACKAGE = Bio::PhyloXS::Matrices::Character
28  
29 PROTOTYPES: DISABLE
30  
31  
32 Character *
33 create (classname)
34 const char * classname
35  
36 void
37 initialize_character (self)
38 Character * self
39 PREINIT:
40 I32* temp;
41 PPCODE:
42 0 temp = PL_markstack_ptr++;
43 0 initialize_character(self);
44 0 ▶ if (PL_markstack_ptr != temp) {
Branch: 1 branch
BranchTrueFalseTotal
if (PL_markstack_ptr != temp) { 0 0 0
45 /* truly void, because dXSARGS not invoked */
46 0 PL_markstack_ptr = temp;
47 0 XSRETURN_EMPTY; /* return empty stack */
48 }
49 /* must have used dXSARGS; list context implied */
50 0 return; /* assume stack size is correct */
51  
52 void
53 destroy_character (self)
54 Character * self
55 PREINIT:
56 I32* temp;
57 PPCODE:
58 0 temp = PL_markstack_ptr++;
59 0 destroy_character(self);
60 0 ▶ if (PL_markstack_ptr != temp) {
Branch: 1 branch
BranchTrueFalseTotal
if (PL_markstack_ptr != temp) { 0 0 0
61 /* truly void, because dXSARGS not invoked */
62 0 PL_markstack_ptr = temp;
63 0 XSRETURN_EMPTY; /* return empty stack */
64 }
65 /* must have used dXSARGS; list context implied */
66 0 return; /* assume stack size is correct */
67  
« lib/Bio/PhyloXS/Listable.xs ↑ Summary lib/Bio/PhyloXS/Matrices/Characters.xs »