xs/MOP.xs

filter: Statementstmt 100% 7 / 7 Branchbran 62.5% 5 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 80.0% 12 / 15 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« mop.c ↑ Summary xs/Moose.xs »
1 #include "mop.h"
2 #include "ppport.h"
3  
4 MODULE = Class::MOP PACKAGE = Class::MOP
5  
6 PROTOTYPES: DISABLE
7  
8 # use prototype here to be compatible with get_code_info from Sub::Identify
9 void
10 get_code_info(coderef)
11 SV *coderef
12 PROTOTYPE: $
13 PREINIT:
14 238188 char *pkg = NULL;
15 238188 char *name = NULL;
16 PPCODE:
17 238188 ▶ SvGETMAGIC(coderef);
Branch: 2 branches
BranchTrueFalseTotal
SvGETMAGIC(coderef); 1 238187 238188
SvGETMAGIC(coderef); 0 1 1
18 238188 ▶ if (mop_get_code_info(coderef, &pkg, &name)) {
Branch: 1 branch
BranchTrueFalseTotal
if (mop_get_code_info(coderef, &pkg, &name)) { 238188 0 238188
19 238188 ▶ EXTEND(SP, 2);
Branch: 1 branch
BranchTrueFalseTotal
EXTEND(SP, 2); 0 238188 238188
20 238188 mPUSHs(newSVpv(pkg, 0));
21 238188 mPUSHs(newSVpv(name, 0));
22 }
« mop.c ↑ Summary xs/Moose.xs »