srcout/option_accessors.xs

filter: Statementstmt 60.6% 37 / 61 Branchbran 38.4% 10 / 26 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 54.0% 47 / 87 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« srcout/tuba_dispatch_getmeth.h ↑ Summary jsonxs_inline.h »
1 # This file generated by './srcutil/accessors.pl' and is meant to generate easy boolean
2 # getters and setters
3  
4 MODULE = JSON::SL PACKAGE = JSON::SL::Tuba PREFIX = PLTUBA_
5  
6 PROTOTYPES: DISABLED
7  
8 #define PLTUBA_OPTION_IX_utf8 1
9 #define PLTUBA_OPTION_IX_no_cache_mro 2
10 #define PLTUBA_OPTION_IX_cb_unified 3
11 #define PLTUBA_OPTION_IX_allow_unhandled 4
12  
13 int
14 PLTUBA__options(PLTUBA* obj, ...)
15 ALIAS:
16 utf8 = PLTUBA_OPTION_IX_utf8
17 no_cache_mro = PLTUBA_OPTION_IX_no_cache_mro
18 cb_unified = PLTUBA_OPTION_IX_cb_unified
19 allow_unhandled = PLTUBA_OPTION_IX_allow_unhandled
20 CODE:
21 2 RETVAL = 0;
22 2 ▶ if (ix == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (ix == 0) { 0 2 2
23 0 die("Do not call this function (_options) directly");
24 }
25 2 ▶ if (items > 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items > 2) { 0 2 2
26 0 die("Usage: %s(o, ... boolean)", GvNAME(GvCV(cv)));
27 }
28  
29 2 switch(ix) {
30 0 case PLTUBA_OPTION_IX_utf8:
31 0 RETVAL = obj->options.utf8;
32 0 ▶ if (items == 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items == 2) { 0 0 0
33 0 obj->options.utf8 = SvIV(ST(1));
34 }
35 0 break;
36 0 case PLTUBA_OPTION_IX_no_cache_mro:
37 0 RETVAL = obj->options.no_cache_mro;
38 0 ▶ if (items == 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items == 2) { 0 0 0
39 0 obj->options.no_cache_mro = SvIV(ST(1));
40 }
41 0 break;
42 1 case PLTUBA_OPTION_IX_cb_unified:
43 1 RETVAL = obj->options.cb_unified;
44 1 ▶ if (items == 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items == 2) { 0 1 1
45 0 obj->options.cb_unified = SvIV(ST(1));
46 }
47 1 break;
48 1 case PLTUBA_OPTION_IX_allow_unhandled:
49 1 RETVAL = obj->options.allow_unhandled;
50 1 ▶ if (items == 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items == 2) { 1 0 1
51 1 obj->options.allow_unhandled = SvIV(ST(1));
52 }
53 1 break;
54 0 default:
55 0 die("Unrecognized IX!?");
56 break;
57 }
58 OUTPUT: RETVAL
59  
60  
61 MODULE = JSON::SL PACKAGE = JSON::SL PREFIX = PLJSONSL_
62  
63 PROTOTYPES: DISABLED
64  
65 #define PLJSONSL_OPTION_IX_utf8 1
66 #define PLJSONSL_OPTION_IX_nopath 2
67 #define PLJSONSL_OPTION_IX_noqstr 3
68 #define PLJSONSL_OPTION_IX_max_size 4
69 #define PLJSONSL_OPTION_IX_object_drip 5
70  
71 int
72 PLJSONSL__options(PLJSONSL* obj, ...)
73 ALIAS:
74 utf8 = PLJSONSL_OPTION_IX_utf8
75 nopath = PLJSONSL_OPTION_IX_nopath
76 noqstr = PLJSONSL_OPTION_IX_noqstr
77 max_size = PLJSONSL_OPTION_IX_max_size
78 object_drip = PLJSONSL_OPTION_IX_object_drip
79 CODE:
80 4 RETVAL = 0;
81 4 ▶ if (ix == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (ix == 0) { 0 4 4
82 0 die("Do not call this function (_options) directly");
83 }
84 4 ▶ if (items > 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items > 2) { 0 4 4
85 0 die("Usage: %s(o, ... boolean)", GvNAME(GvCV(cv)));
86 }
87  
88 4 switch(ix) {
89 0 case PLJSONSL_OPTION_IX_utf8:
90 0 RETVAL = obj->options.utf8;
91 0 ▶ if (items == 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items == 2) { 0 0 0
92 0 obj->options.utf8 = SvIV(ST(1));
93 }
94 0 break;
95 1 case PLJSONSL_OPTION_IX_nopath:
96 1 RETVAL = obj->options.nopath;
97 1 ▶ if (items == 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items == 2) { 1 0 1
98 1 obj->options.nopath = SvIV(ST(1));
99 }
100 1 break;
101 1 case PLJSONSL_OPTION_IX_noqstr:
102 1 RETVAL = obj->options.noqstr;
103 1 ▶ if (items == 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items == 2) { 1 0 1
104 1 obj->options.noqstr = SvIV(ST(1));
105 }
106 1 break;
107 1 case PLJSONSL_OPTION_IX_max_size:
108 1 RETVAL = obj->options.max_size;
109 1 ▶ if (items == 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items == 2) { 1 0 1
110 1 obj->options.max_size = SvIV(ST(1));
111 }
112 1 break;
113 1 case PLJSONSL_OPTION_IX_object_drip:
114 1 RETVAL = obj->options.object_drip;
115 1 ▶ if (items == 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (items == 2) { 1 0 1
116 1 obj->options.object_drip = SvIV(ST(1));
117 }
118 1 break;
119 0 default:
120 0 die("Unrecognized IX!?");
121 break;
122 }
123 OUTPUT: RETVAL
124  
« srcout/tuba_dispatch_getmeth.h ↑ Summary jsonxs_inline.h »