xsubs/typeof.xs

filter: Statementstmt 100% 5 / 5 Branchbran 100% 6 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 11 / 11 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xsubs/sourcify.xs ↑ Summary
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: typeof
13 #
14 # WRITTEN BY: Marcus Holland-Moritz ON: Mar 2003
15 # CHANGED BY: ON:
16 #
17 ################################################################################
18  
19 SV *
20 CBC::typeof(type)
21 const char *type
22  
23 PREINIT:
24 32191 CBC_METHOD(typeof);
25 MemberInfo mi;
26  
27 CODE:
28 CT_DEBUG_METHOD1("'%s'", type);
29  
30 32191 ▶ CHECK_VOID_CONTEXT;
Branch: 2 branches
BranchTrueFalseTotal
CHECK_VOID_CONTEXT; 12 32179 32191
CHECK_VOID_CONTEXT; 8 4 12
31  
32 32179 ▶ 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)) 12 32035 32047
33 12 Perl_croak(aTHX_ "Cannot find '%s'", type);
34  
35 32035 RETVAL = get_type_name_string(aTHX_ &mi);
36  
37 OUTPUT:
38 RETVAL
39  
« xsubs/sourcify.xs ↑ Summary