xsubs/initializer.xs

filter: Statementstmt 100% 6 / 6 Branchbran 100% 8 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 14 / 14 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xsubs/configure.xs ↑ Summary xsubs/native.xs »
1 ################################################################################
2 #
3 # Copyright (c) 2002-2020 Marcus Holland-Moritz. All rights reserved.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the same terms as Perl itself.
6 #
7 ################################################################################
8  
9  
10 ################################################################################
11 #
12 # METHOD: initializer
13 #
14 # WRITTEN BY: Marcus Holland-Moritz ON: Jun 2003
15 # CHANGED BY: ON:
16 #
17 ################################################################################
18  
19 SV *
20 CBC::initializer(type, init = &PL_sv_undef)
21 const char *type
22 SV *init
23  
24 PREINIT:
25 275 ▶ CBC_METHOD(initializer);
Branch: 1 branch
BranchTrueFalseTotal
CBC_METHOD(initializer); 73 202 275
26 MemberInfo mi;
27  
28 CODE:
29 CT_DEBUG_METHOD1("'%s'", type);
30  
31 275 ▶ CHECK_VOID_CONTEXT;
Branch: 2 branches
BranchTrueFalseTotal
CHECK_VOID_CONTEXT; 12 263 275
CHECK_VOID_CONTEXT; 8 4 12
32  
33 263 ▶ if (!get_member_info(aTHX_ THIS, type, &mi, CBC_GMI_NO_CALC))
Branch: 1 branch
BranchTrueFalseTotal
if (!get_member_info(aTHX_ THIS, type, &mi, CBC_GMI_NO_CALC)) 18 233 251
34 18 Perl_croak(aTHX_ "Cannot find '%s'", type);
35  
36 233 SvGETMAGIC(init);
37  
38 233 RETVAL = get_initializer_string(aTHX_ THIS, &mi, init, type);
39  
40 OUTPUT:
41 RETVAL
42  
« xsubs/configure.xs ↑ Summary xsubs/native.xs »