const-c.inc

filter: Statementstmt 0.0% 0 / 409 Branchbran 0.0% 0 / 136 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 545 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Sereal/Splitter.pm ↑ Summary const-xs.inc »
1 #define PERL_constant_NOTFOUND 1
2 #define PERL_constant_NOTDEF 2
3 #define PERL_constant_ISIV 3
4 #define PERL_constant_ISNO 4
5 #define PERL_constant_ISNV 5
6 #define PERL_constant_ISPV 6
7 #define PERL_constant_ISPVN 7
8 #define PERL_constant_ISSV 8
9 #define PERL_constant_ISUNDEF 9
10 #define PERL_constant_ISUV 10
11 #define PERL_constant_ISYES 11
12  
13 #ifndef NVTYPE
14 typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
15 #endif
16 #ifndef aTHX_
17 #define aTHX_ /* 5.6 or later define this for threading support. */
18 #endif
19 #ifndef pTHX_
20 #define pTHX_ /* 5.6 or later define this for threading support. */
21 #endif
22  
23 static int
24 0 constant_11 (pTHX_ const char *name, IV *iv_return) {
25 /* When generated this function returned values for the list of names given
26 here. However, subsequent manual editing may have added or removed some.
27 SRL_HDR_NEG SRL_HDR_PAD SRL_HDR_POS */
28 /* Offset 9 gives the best switch position. */
29 0 switch (name[9]) {
30 0 case 'A':
31 0 ▶ if (memEQ(name, "SRL_HDR_PAD", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_PAD", 11)) { 0 0 0
32 /* ^ */
33 #ifdef SRL_HDR_PAD
34 0 *iv_return = SRL_HDR_PAD;
35 0 return PERL_constant_ISIV;
36 #else
37 return PERL_constant_NOTDEF;
38 #endif
39 }
40 0 break;
41 0 case 'E':
42 0 ▶ if (memEQ(name, "SRL_HDR_NEG", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_NEG", 11)) { 0 0 0
43 /* ^ */
44 #ifdef SRL_HDR_NEG
45 0 *iv_return = SRL_HDR_NEG;
46 0 return PERL_constant_ISIV;
47 #else
48 return PERL_constant_NOTDEF;
49 #endif
50 }
51 0 break;
52 0 case 'O':
53 0 ▶ if (memEQ(name, "SRL_HDR_POS", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_POS", 11)) { 0 0 0
54 /* ^ */
55 #ifdef SRL_HDR_POS
56 0 *iv_return = SRL_HDR_POS;
57 0 return PERL_constant_ISIV;
58 #else
59 return PERL_constant_NOTDEF;
60 #endif
61 }
62 0 break;
63 }
64 0 return PERL_constant_NOTFOUND;
65 }
66  
67 static int
68 0 constant_12 (pTHX_ const char *name, IV *iv_return) {
69 /* When generated this function returned values for the list of names given
70 here. However, subsequent manual editing may have added or removed some.
71 SRL_HDR_COPY SRL_HDR_HASH SRL_HDR_MANY SRL_HDR_REFN SRL_HDR_REFP
72 SRL_HDR_TRUE */
73 /* Offset 10 gives the best switch position. */
74 0 switch (name[10]) {
75 0 case 'F':
76 0 ▶ if (memEQ(name, "SRL_HDR_REFN", 12)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_REFN", 12)) { 0 0 0
77 /* ^ */
78 #ifdef SRL_HDR_REFN
79 0 *iv_return = SRL_HDR_REFN;
80 0 return PERL_constant_ISIV;
81 #else
82 return PERL_constant_NOTDEF;
83 #endif
84 }
85 0 ▶ if (memEQ(name, "SRL_HDR_REFP", 12)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_REFP", 12)) { 0 0 0
86 /* ^ */
87 #ifdef SRL_HDR_REFP
88 0 *iv_return = SRL_HDR_REFP;
89 0 return PERL_constant_ISIV;
90 #else
91 return PERL_constant_NOTDEF;
92 #endif
93 }
94 0 break;
95 0 case 'N':
96 0 ▶ if (memEQ(name, "SRL_HDR_MANY", 12)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_MANY", 12)) { 0 0 0
97 /* ^ */
98 #ifdef SRL_HDR_MANY
99 0 *iv_return = SRL_HDR_MANY;
100 0 return PERL_constant_ISIV;
101 #else
102 return PERL_constant_NOTDEF;
103 #endif
104 }
105 0 break;
106 0 case 'P':
107 0 ▶ if (memEQ(name, "SRL_HDR_COPY", 12)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_COPY", 12)) { 0 0 0
108 /* ^ */
109 #ifdef SRL_HDR_COPY
110 0 *iv_return = SRL_HDR_COPY;
111 0 return PERL_constant_ISIV;
112 #else
113 return PERL_constant_NOTDEF;
114 #endif
115 }
116 0 break;
117 0 case 'S':
118 0 ▶ if (memEQ(name, "SRL_HDR_HASH", 12)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_HASH", 12)) { 0 0 0
119 /* ^ */
120 #ifdef SRL_HDR_HASH
121 0 *iv_return = SRL_HDR_HASH;
122 0 return PERL_constant_ISIV;
123 #else
124 return PERL_constant_NOTDEF;
125 #endif
126 }
127 0 break;
128 0 case 'U':
129 0 ▶ if (memEQ(name, "SRL_HDR_TRUE", 12)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_TRUE", 12)) { 0 0 0
130 /* ^ */
131 #ifdef SRL_HDR_TRUE
132 0 *iv_return = SRL_HDR_TRUE;
133 0 return PERL_constant_ISIV;
134 #else
135 return PERL_constant_NOTDEF;
136 #endif
137 }
138 0 break;
139 }
140 0 return PERL_constant_NOTFOUND;
141 }
142  
143 static int
144 0 constant_13 (pTHX_ const char *name, IV *iv_return) {
145 /* When generated this function returned values for the list of names given
146 here. However, subsequent manual editing may have added or removed some.
147 SRL_HDR_ALIAS SRL_HDR_ARRAY SRL_HDR_FALSE SRL_HDR_FLOAT SRL_HDR_UNDEF */
148 /* Offset 10 gives the best switch position. */
149 0 switch (name[10]) {
150 0 case 'D':
151 0 ▶ if (memEQ(name, "SRL_HDR_UNDEF", 13)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_UNDEF", 13)) { 0 0 0
152 /* ^ */
153 #ifdef SRL_HDR_UNDEF
154 0 *iv_return = SRL_HDR_UNDEF;
155 0 return PERL_constant_ISIV;
156 #else
157 return PERL_constant_NOTDEF;
158 #endif
159 }
160 0 break;
161 0 case 'I':
162 0 ▶ if (memEQ(name, "SRL_HDR_ALIAS", 13)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_ALIAS", 13)) { 0 0 0
163 /* ^ */
164 #ifdef SRL_HDR_ALIAS
165 0 *iv_return = SRL_HDR_ALIAS;
166 0 return PERL_constant_ISIV;
167 #else
168 return PERL_constant_NOTDEF;
169 #endif
170 }
171 0 break;
172 0 case 'L':
173 0 ▶ if (memEQ(name, "SRL_HDR_FALSE", 13)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_FALSE", 13)) { 0 0 0
174 /* ^ */
175 #ifdef SRL_HDR_FALSE
176 0 *iv_return = SRL_HDR_FALSE;
177 0 return PERL_constant_ISIV;
178 #else
179 return PERL_constant_NOTDEF;
180 #endif
181 }
182 0 break;
183 0 case 'O':
184 0 ▶ if (memEQ(name, "SRL_HDR_FLOAT", 13)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_FLOAT", 13)) { 0 0 0
185 /* ^ */
186 #ifdef SRL_HDR_FLOAT
187 0 *iv_return = SRL_HDR_FLOAT;
188 0 return PERL_constant_ISIV;
189 #else
190 return PERL_constant_NOTDEF;
191 #endif
192 }
193 0 break;
194 0 case 'R':
195 0 ▶ if (memEQ(name, "SRL_HDR_ARRAY", 13)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_ARRAY", 13)) { 0 0 0
196 /* ^ */
197 #ifdef SRL_HDR_ARRAY
198 0 *iv_return = SRL_HDR_ARRAY;
199 0 return PERL_constant_ISIV;
200 #else
201 return PERL_constant_NOTDEF;
202 #endif
203 }
204 0 break;
205 }
206 0 return PERL_constant_NOTFOUND;
207 }
208  
209 static int
210 0 constant_14 (pTHX_ const char *name, IV *iv_return) {
211 /* When generated this function returned values for the list of names given
212 here. However, subsequent manual editing may have added or removed some.
213 SRL_HDR_BINARY SRL_HDR_DOUBLE SRL_HDR_EXTEND SRL_HDR_OBJECT SRL_HDR_REGEXP
214 SRL_HDR_VARINT SRL_HDR_WEAKEN SRL_HDR_ZIGZAG */
215 /* Offset 8 gives the best switch position. */
216 0 switch (name[8]) {
217 0 case 'B':
218 0 ▶ if (memEQ(name, "SRL_HDR_BINARY", 14)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_BINARY", 14)) { 0 0 0
219 /* ^ */
220 #ifdef SRL_HDR_BINARY
221 0 *iv_return = SRL_HDR_BINARY;
222 0 return PERL_constant_ISIV;
223 #else
224 return PERL_constant_NOTDEF;
225 #endif
226 }
227 0 break;
228 0 case 'D':
229 0 ▶ if (memEQ(name, "SRL_HDR_DOUBLE", 14)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_DOUBLE", 14)) { 0 0 0
230 /* ^ */
231 #ifdef SRL_HDR_DOUBLE
232 0 *iv_return = SRL_HDR_DOUBLE;
233 0 return PERL_constant_ISIV;
234 #else
235 return PERL_constant_NOTDEF;
236 #endif
237 }
238 0 break;
239 0 case 'E':
240 0 ▶ if (memEQ(name, "SRL_HDR_EXTEND", 14)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_EXTEND", 14)) { 0 0 0
241 /* ^ */
242 #ifdef SRL_HDR_EXTEND
243 0 *iv_return = SRL_HDR_EXTEND;
244 0 return PERL_constant_ISIV;
245 #else
246 return PERL_constant_NOTDEF;
247 #endif
248 }
249 0 break;
250 0 case 'O':
251 0 ▶ if (memEQ(name, "SRL_HDR_OBJECT", 14)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_OBJECT", 14)) { 0 0 0
252 /* ^ */
253 #ifdef SRL_HDR_OBJECT
254 0 *iv_return = SRL_HDR_OBJECT;
255 0 return PERL_constant_ISIV;
256 #else
257 return PERL_constant_NOTDEF;
258 #endif
259 }
260 0 break;
261 0 case 'R':
262 0 ▶ if (memEQ(name, "SRL_HDR_REGEXP", 14)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_REGEXP", 14)) { 0 0 0
263 /* ^ */
264 #ifdef SRL_HDR_REGEXP
265 0 *iv_return = SRL_HDR_REGEXP;
266 0 return PERL_constant_ISIV;
267 #else
268 return PERL_constant_NOTDEF;
269 #endif
270 }
271 0 break;
272 0 case 'V':
273 0 ▶ if (memEQ(name, "SRL_HDR_VARINT", 14)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_VARINT", 14)) { 0 0 0
274 /* ^ */
275 #ifdef SRL_HDR_VARINT
276 0 *iv_return = SRL_HDR_VARINT;
277 0 return PERL_constant_ISIV;
278 #else
279 return PERL_constant_NOTDEF;
280 #endif
281 }
282 0 break;
283 0 case 'W':
284 0 ▶ if (memEQ(name, "SRL_HDR_WEAKEN", 14)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_WEAKEN", 14)) { 0 0 0
285 /* ^ */
286 #ifdef SRL_HDR_WEAKEN
287 0 *iv_return = SRL_HDR_WEAKEN;
288 0 return PERL_constant_ISIV;
289 #else
290 return PERL_constant_NOTDEF;
291 #endif
292 }
293 0 break;
294 0 case 'Z':
295 0 ▶ if (memEQ(name, "SRL_HDR_ZIGZAG", 14)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_ZIGZAG", 14)) { 0 0 0
296 /* ^ */
297 #ifdef SRL_HDR_ZIGZAG
298 0 *iv_return = SRL_HDR_ZIGZAG;
299 0 return PERL_constant_ISIV;
300 #else
301 return PERL_constant_NOTDEF;
302 #endif
303 }
304 0 break;
305 }
306 0 return PERL_constant_NOTFOUND;
307 }
308  
309 static int
310 0 constant_15 (pTHX_ const char *name, IV *iv_return) {
311 /* When generated this function returned values for the list of names given
312 here. However, subsequent manual editing may have added or removed some.
313 SRL_HDR_HASHREF SRL_HDR_NEG_LOW SRL_HDR_OBJECTV SRL_HDR_POS_LOW */
314 /* Offset 8 gives the best switch position. */
315 0 switch (name[8]) {
316 0 case 'H':
317 0 ▶ if (memEQ(name, "SRL_HDR_HASHREF", 15)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_HASHREF", 15)) { 0 0 0
318 /* ^ */
319 #ifdef SRL_HDR_HASHREF
320 0 *iv_return = SRL_HDR_HASHREF;
321 0 return PERL_constant_ISIV;
322 #else
323 return PERL_constant_NOTDEF;
324 #endif
325 }
326 0 break;
327 0 case 'N':
328 0 ▶ if (memEQ(name, "SRL_HDR_NEG_LOW", 15)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_NEG_LOW", 15)) { 0 0 0
329 /* ^ */
330 #ifdef SRL_HDR_NEG_LOW
331 0 *iv_return = SRL_HDR_NEG_LOW;
332 0 return PERL_constant_ISIV;
333 #else
334 return PERL_constant_NOTDEF;
335 #endif
336 }
337 0 break;
338 0 case 'O':
339 0 ▶ if (memEQ(name, "SRL_HDR_OBJECTV", 15)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_OBJECTV", 15)) { 0 0 0
340 /* ^ */
341 #ifdef SRL_HDR_OBJECTV
342 0 *iv_return = SRL_HDR_OBJECTV;
343 0 return PERL_constant_ISIV;
344 #else
345 return PERL_constant_NOTDEF;
346 #endif
347 }
348 0 break;
349 0 case 'P':
350 0 ▶ if (memEQ(name, "SRL_HDR_POS_LOW", 15)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_POS_LOW", 15)) { 0 0 0
351 /* ^ */
352 #ifdef SRL_HDR_POS_LOW
353 0 *iv_return = SRL_HDR_POS_LOW;
354 0 return PERL_constant_ISIV;
355 #else
356 return PERL_constant_NOTDEF;
357 #endif
358 }
359 0 break;
360 }
361 0 return PERL_constant_NOTFOUND;
362 }
363  
364 static int
365 0 constant_16 (pTHX_ const char *name, IV *iv_return) {
366 /* When generated this function returned values for the list of names given
367 here. However, subsequent manual editing may have added or removed some.
368 SRL_HDR_ARRAYREF SRL_HDR_NEG_HIGH SRL_HDR_POS_HIGH SRL_HDR_RESERVED
369 SRL_HDR_STR_UTF8 SRL_MAGIC_STRLEN SRL_NEG_MIN_SIZE SRL_POS_MAX_SIZE */
370 /* Offset 8 gives the best switch position. */
371 0 switch (name[8]) {
372 0 case 'A':
373 0 ▶ if (memEQ(name, "SRL_HDR_ARRAYREF", 16)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_ARRAYREF", 16)) { 0 0 0
374 /* ^ */
375 #ifdef SRL_HDR_ARRAYREF
376 0 *iv_return = SRL_HDR_ARRAYREF;
377 0 return PERL_constant_ISIV;
378 #else
379 return PERL_constant_NOTDEF;
380 #endif
381 }
382 0 break;
383 0 case 'C':
384 0 ▶ if (memEQ(name, "SRL_MAGIC_STRLEN", 16)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_MAGIC_STRLEN", 16)) { 0 0 0
385 /* ^ */
386 #ifdef SRL_MAGIC_STRLEN
387 0 *iv_return = SRL_MAGIC_STRLEN;
388 0 return PERL_constant_ISIV;
389 #else
390 return PERL_constant_NOTDEF;
391 #endif
392 }
393 0 break;
394 0 case 'M':
395 0 ▶ if (memEQ(name, "SRL_NEG_MIN_SIZE", 16)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_NEG_MIN_SIZE", 16)) { 0 0 0
396 /* ^ */
397 #ifdef SRL_NEG_MIN_SIZE
398 0 *iv_return = SRL_NEG_MIN_SIZE;
399 0 return PERL_constant_ISIV;
400 #else
401 return PERL_constant_NOTDEF;
402 #endif
403 }
404 0 ▶ if (memEQ(name, "SRL_POS_MAX_SIZE", 16)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_POS_MAX_SIZE", 16)) { 0 0 0
405 /* ^ */
406 #ifdef SRL_POS_MAX_SIZE
407 0 *iv_return = SRL_POS_MAX_SIZE;
408 0 return PERL_constant_ISIV;
409 #else
410 return PERL_constant_NOTDEF;
411 #endif
412 }
413 0 break;
414 0 case 'N':
415 0 ▶ if (memEQ(name, "SRL_HDR_NEG_HIGH", 16)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_NEG_HIGH", 16)) { 0 0 0
416 /* ^ */
417 #ifdef SRL_HDR_NEG_HIGH
418 0 *iv_return = SRL_HDR_NEG_HIGH;
419 0 return PERL_constant_ISIV;
420 #else
421 return PERL_constant_NOTDEF;
422 #endif
423 }
424 0 break;
425 0 case 'P':
426 0 ▶ if (memEQ(name, "SRL_HDR_POS_HIGH", 16)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_POS_HIGH", 16)) { 0 0 0
427 /* ^ */
428 #ifdef SRL_HDR_POS_HIGH
429 0 *iv_return = SRL_HDR_POS_HIGH;
430 0 return PERL_constant_ISIV;
431 #else
432 return PERL_constant_NOTDEF;
433 #endif
434 }
435 0 break;
436 0 case 'R':
437 0 ▶ if (memEQ(name, "SRL_HDR_RESERVED", 16)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_RESERVED", 16)) { 0 0 0
438 /* ^ */
439 #ifdef SRL_HDR_RESERVED
440 0 *iv_return = SRL_HDR_RESERVED;
441 0 return PERL_constant_ISIV;
442 #else
443 return PERL_constant_NOTDEF;
444 #endif
445 }
446 0 break;
447 0 case 'S':
448 0 ▶ if (memEQ(name, "SRL_HDR_STR_UTF8", 16)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_STR_UTF8", 16)) { 0 0 0
449 /* ^ */
450 #ifdef SRL_HDR_STR_UTF8
451 0 *iv_return = SRL_HDR_STR_UTF8;
452 0 return PERL_constant_ISIV;
453 #else
454 return PERL_constant_NOTDEF;
455 #endif
456 }
457 0 break;
458 }
459 0 return PERL_constant_NOTFOUND;
460 }
461  
462 static int
463 0 constant_20 (pTHX_ const char *name, IV *iv_return) {
464 /* When generated this function returned values for the list of names given
465 here. However, subsequent manual editing may have added or removed some.
466 SRL_HDR_ARRAYREF_LOW SRL_HDR_HASHREF_HIGH SRL_HDR_PACKET_START
467 SRL_HDR_RESERVED_LOW SRL_HDR_SHORT_BINARY SRL_PROTOCOL_VERSION */
468 /* Offset 11 gives the best switch position. */
469 0 switch (name[11]) {
470 0 case 'A':
471 0 ▶ if (memEQ(name, "SRL_HDR_ARRAYREF_LOW", 20)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_ARRAYREF_LOW", 20)) { 0 0 0
472 /* ^ */
473 #ifdef SRL_HDR_ARRAYREF_LOW
474 0 *iv_return = SRL_HDR_ARRAYREF_LOW;
475 0 return PERL_constant_ISIV;
476 #else
477 return PERL_constant_NOTDEF;
478 #endif
479 }
480 0 break;
481 0 case 'E':
482 0 ▶ if (memEQ(name, "SRL_HDR_RESERVED_LOW", 20)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_RESERVED_LOW", 20)) { 0 0 0
483 /* ^ */
484 #ifdef SRL_HDR_RESERVED_LOW
485 0 *iv_return = SRL_HDR_RESERVED_LOW;
486 0 return PERL_constant_ISIV;
487 #else
488 return PERL_constant_NOTDEF;
489 #endif
490 }
491 0 break;
492 0 case 'H':
493 0 ▶ if (memEQ(name, "SRL_HDR_HASHREF_HIGH", 20)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_HASHREF_HIGH", 20)) { 0 0 0
494 /* ^ */
495 #ifdef SRL_HDR_HASHREF_HIGH
496 0 *iv_return = SRL_HDR_HASHREF_HIGH;
497 0 return PERL_constant_ISIV;
498 #else
499 return PERL_constant_NOTDEF;
500 #endif
501 }
502 0 break;
503 0 case 'K':
504 0 ▶ if (memEQ(name, "SRL_HDR_PACKET_START", 20)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_PACKET_START", 20)) { 0 0 0
505 /* ^ */
506 #ifdef SRL_HDR_PACKET_START
507 0 *iv_return = SRL_HDR_PACKET_START;
508 0 return PERL_constant_ISIV;
509 #else
510 return PERL_constant_NOTDEF;
511 #endif
512 }
513 0 break;
514 0 case 'L':
515 0 ▶ if (memEQ(name, "SRL_PROTOCOL_VERSION", 20)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_PROTOCOL_VERSION", 20)) { 0 0 0
516 /* ^ */
517 #ifdef SRL_PROTOCOL_VERSION
518 0 *iv_return = SRL_PROTOCOL_VERSION;
519 0 return PERL_constant_ISIV;
520 #else
521 return PERL_constant_NOTDEF;
522 #endif
523 }
524 0 break;
525 0 case 'R':
526 0 ▶ if (memEQ(name, "SRL_HDR_SHORT_BINARY", 20)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_SHORT_BINARY", 20)) { 0 0 0
527 /* ^ */
528 #ifdef SRL_HDR_SHORT_BINARY
529 0 *iv_return = SRL_HDR_SHORT_BINARY;
530 0 return PERL_constant_ISIV;
531 #else
532 return PERL_constant_NOTDEF;
533 #endif
534 }
535 0 break;
536 }
537 0 return PERL_constant_NOTFOUND;
538 }
539  
540 static int
541 0 constant_21 (pTHX_ const char *name, IV *iv_return) {
542 /* When generated this function returned values for the list of names given
543 here. However, subsequent manual editing may have added or removed some.
544 SRL_HDR_ARRAYREF_HIGH SRL_HDR_OBJECT_FREEZE SRL_HDR_RESERVED_HIGH */
545 /* Offset 13 gives the best switch position. */
546 0 switch (name[13]) {
547 0 case 'R':
548 0 ▶ if (memEQ(name, "SRL_HDR_ARRAYREF_HIGH", 21)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_ARRAYREF_HIGH", 21)) { 0 0 0
549 /* ^ */
550 #ifdef SRL_HDR_ARRAYREF_HIGH
551 0 *iv_return = SRL_HDR_ARRAYREF_HIGH;
552 0 return PERL_constant_ISIV;
553 #else
554 return PERL_constant_NOTDEF;
555 #endif
556 }
557 0 break;
558 0 case 'T':
559 0 ▶ if (memEQ(name, "SRL_HDR_OBJECT_FREEZE", 21)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_OBJECT_FREEZE", 21)) { 0 0 0
560 /* ^ */
561 #ifdef SRL_HDR_OBJECT_FREEZE
562 0 *iv_return = SRL_HDR_OBJECT_FREEZE;
563 0 return PERL_constant_ISIV;
564 #else
565 return PERL_constant_NOTDEF;
566 #endif
567 }
568 0 break;
569 0 case 'V':
570 0 ▶ if (memEQ(name, "SRL_HDR_RESERVED_HIGH", 21)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_RESERVED_HIGH", 21)) { 0 0 0
571 /* ^ */
572 #ifdef SRL_HDR_RESERVED_HIGH
573 0 *iv_return = SRL_HDR_RESERVED_HIGH;
574 0 return PERL_constant_ISIV;
575 #else
576 return PERL_constant_NOTDEF;
577 #endif
578 }
579 0 break;
580 }
581 0 return PERL_constant_NOTFOUND;
582 }
583  
584 static int
585 0 constant_24 (pTHX_ const char *name, IV *iv_return) {
586 /* When generated this function returned values for the list of names given
587 here. However, subsequent manual editing may have added or removed some.
588 SRL_HDR_SHORT_BINARY_LOW SRL_MAGIC_STRING_UINT_BE SRL_MAGIC_STRING_UINT_LE
589 */
590 /* Offset 22 gives the best switch position. */
591 0 switch (name[22]) {
592 0 case 'B':
593 0 ▶ if (memEQ(name, "SRL_MAGIC_STRING_UINT_BE", 24)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_MAGIC_STRING_UINT_BE", 24)) { 0 0 0
594 /* ^ */
595 #ifdef SRL_MAGIC_STRING_UINT_BE
596 0 *iv_return = SRL_MAGIC_STRING_UINT_BE;
597 0 return PERL_constant_ISIV;
598 #else
599 return PERL_constant_NOTDEF;
600 #endif
601 }
602 0 break;
603 0 case 'L':
604 0 ▶ if (memEQ(name, "SRL_MAGIC_STRING_UINT_LE", 24)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_MAGIC_STRING_UINT_LE", 24)) { 0 0 0
605 /* ^ */
606 #ifdef SRL_MAGIC_STRING_UINT_LE
607 0 *iv_return = SRL_MAGIC_STRING_UINT_LE;
608 0 return PERL_constant_ISIV;
609 #else
610 return PERL_constant_NOTDEF;
611 #endif
612 }
613 0 break;
614 0 case 'O':
615 0 ▶ if (memEQ(name, "SRL_HDR_SHORT_BINARY_LOW", 24)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_SHORT_BINARY_LOW", 24)) { 0 0 0
616 /* ^ */
617 #ifdef SRL_HDR_SHORT_BINARY_LOW
618 0 *iv_return = SRL_HDR_SHORT_BINARY_LOW;
619 0 return PERL_constant_ISIV;
620 #else
621 return PERL_constant_NOTDEF;
622 #endif
623 }
624 0 break;
625 }
626 0 return PERL_constant_NOTFOUND;
627 }
628  
629 static int
630 0 constant_25 (pTHX_ const char *name, IV *iv_return) {
631 /* When generated this function returned values for the list of names given
632 here. However, subsequent manual editing may have added or removed some.
633 SRL_HDR_SHORT_BINARY_HIGH SRL_MASK_SHORT_BINARY_LEN
634 SRL_PROTOCOL_ENCODING_RAW SRL_PROTOCOL_HDR_CONTINUE
635 SRL_PROTOCOL_VERSION_BITS SRL_PROTOCOL_VERSION_MASK */
636 /* Offset 24 gives the best switch position. */
637 0 switch (name[24]) {
638 0 case 'E':
639 0 ▶ if (memEQ(name, "SRL_PROTOCOL_HDR_CONTINU", 24)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_PROTOCOL_HDR_CONTINU", 24)) { 0 0 0
640 /* E */
641 #ifdef SRL_PROTOCOL_HDR_CONTINUE
642 0 *iv_return = SRL_PROTOCOL_HDR_CONTINUE;
643 0 return PERL_constant_ISIV;
644 #else
645 return PERL_constant_NOTDEF;
646 #endif
647 }
648 0 break;
649 0 case 'H':
650 0 ▶ if (memEQ(name, "SRL_HDR_SHORT_BINARY_HIG", 24)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_HDR_SHORT_BINARY_HIG", 24)) { 0 0 0
651 /* H */
652 #ifdef SRL_HDR_SHORT_BINARY_HIGH
653 0 *iv_return = SRL_HDR_SHORT_BINARY_HIGH;
654 0 return PERL_constant_ISIV;
655 #else
656 return PERL_constant_NOTDEF;
657 #endif
658 }
659 0 break;
660 0 case 'K':
661 0 ▶ if (memEQ(name, "SRL_PROTOCOL_VERSION_MAS", 24)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_PROTOCOL_VERSION_MAS", 24)) { 0 0 0
662 /* K */
663 #ifdef SRL_PROTOCOL_VERSION_MASK
664 0 *iv_return = SRL_PROTOCOL_VERSION_MASK;
665 0 return PERL_constant_ISIV;
666 #else
667 return PERL_constant_NOTDEF;
668 #endif
669 }
670 0 break;
671 0 case 'N':
672 0 ▶ if (memEQ(name, "SRL_MASK_SHORT_BINARY_LE", 24)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_MASK_SHORT_BINARY_LE", 24)) { 0 0 0
673 /* N */
674 #ifdef SRL_MASK_SHORT_BINARY_LEN
675 0 *iv_return = SRL_MASK_SHORT_BINARY_LEN;
676 0 return PERL_constant_ISIV;
677 #else
678 return PERL_constant_NOTDEF;
679 #endif
680 }
681 0 break;
682 0 case 'S':
683 0 ▶ if (memEQ(name, "SRL_PROTOCOL_VERSION_BIT", 24)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_PROTOCOL_VERSION_BIT", 24)) { 0 0 0
684 /* S */
685 #ifdef SRL_PROTOCOL_VERSION_BITS
686 0 *iv_return = SRL_PROTOCOL_VERSION_BITS;
687 0 return PERL_constant_ISIV;
688 #else
689 return PERL_constant_NOTDEF;
690 #endif
691 }
692 0 break;
693 0 case 'W':
694 0 ▶ if (memEQ(name, "SRL_PROTOCOL_ENCODING_RA", 24)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_PROTOCOL_ENCODING_RA", 24)) { 0 0 0
695 /* W */
696 #ifdef SRL_PROTOCOL_ENCODING_RAW
697 0 *iv_return = SRL_PROTOCOL_ENCODING_RAW;
698 0 return PERL_constant_ISIV;
699 #else
700 return PERL_constant_NOTDEF;
701 #endif
702 }
703 0 break;
704 }
705 0 return PERL_constant_NOTFOUND;
706 }
707  
708 static int
709 0 constant_26 (pTHX_ const char *name, IV *iv_return) {
710 /* When generated this function returned values for the list of names given
711 here. However, subsequent manual editing may have added or removed some.
712 SRL_PROTOCOL_ENCODING_MASK SRL_PROTOCOL_ENCODING_ZLIB
713 SRL_PROTOCOL_HDR_USER_DATA */
714 /* Offset 25 gives the best switch position. */
715 0 switch (name[25]) {
716 0 case 'A':
717 0 ▶ if (memEQ(name, "SRL_PROTOCOL_HDR_USER_DAT", 25)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_PROTOCOL_HDR_USER_DAT", 25)) { 0 0 0
718 /* A */
719 #ifdef SRL_PROTOCOL_HDR_USER_DATA
720 0 *iv_return = SRL_PROTOCOL_HDR_USER_DATA;
721 0 return PERL_constant_ISIV;
722 #else
723 return PERL_constant_NOTDEF;
724 #endif
725 }
726 0 break;
727 0 case 'B':
728 0 ▶ if (memEQ(name, "SRL_PROTOCOL_ENCODING_ZLI", 25)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_PROTOCOL_ENCODING_ZLI", 25)) { 0 0 0
729 /* B */
730 #ifdef SRL_PROTOCOL_ENCODING_ZLIB
731 0 *iv_return = SRL_PROTOCOL_ENCODING_ZLIB;
732 0 return PERL_constant_ISIV;
733 #else
734 return PERL_constant_NOTDEF;
735 #endif
736 }
737 0 break;
738 0 case 'K':
739 0 ▶ if (memEQ(name, "SRL_PROTOCOL_ENCODING_MAS", 25)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SRL_PROTOCOL_ENCODING_MAS", 25)) { 0 0 0
740 /* K */
741 #ifdef SRL_PROTOCOL_ENCODING_MASK
742 0 *iv_return = SRL_PROTOCOL_ENCODING_MASK;
743 0 return PERL_constant_ISIV;
744 #else
745 return PERL_constant_NOTDEF;
746 #endif
747 }
748 0 break;
749 }
750 0 return PERL_constant_NOTFOUND;
751 }
752  
753 static int
754 0 constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
755 /* Initially switch on the length of the name. */
756 /* When generated this function returned values for the list of names given
757 in this section of perl code. Rather than manually editing these functions
758 to add or remove constants, which would result in this comment and section
759 of code becoming inaccurate, we recommend that you edit this section of
760 code, and use it to regenerate a new set of constant functions which you
761 then use to replace the originals.
762  
763 Regenerate these constant functions by feeding this entire source file to
764 perl -x
765  
766 #!/Users/dkrotkine/perl5/perlbrew/perls/perl-5.20.1/bin/perl -w
767 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
768  
769 my $types = {map {($_, 1)} qw(IV)};
770 my @names = (qw(SRL_HDR_ALIAS SRL_HDR_ARRAY SRL_HDR_ARRAYREF
771 SRL_HDR_ARRAYREF_HIGH SRL_HDR_ARRAYREF_LOW SRL_HDR_BINARY
772 SRL_HDR_CANONICAL_UNDEF SRL_HDR_COPY SRL_HDR_DOUBLE
773 SRL_HDR_EXTEND SRL_HDR_FALSE SRL_HDR_FLOAT SRL_HDR_HASH
774 SRL_HDR_HASHREF SRL_HDR_HASHREF_HIGH SRL_HDR_HASHREF_LOW
775 SRL_HDR_LONG_DOUBLE SRL_HDR_MANY SRL_HDR_NEG SRL_HDR_NEG_HIGH
776 SRL_HDR_NEG_LOW SRL_HDR_OBJECT SRL_HDR_OBJECTV
777 SRL_HDR_OBJECTV_FREEZE SRL_HDR_OBJECT_FREEZE
778 SRL_HDR_PACKET_START SRL_HDR_PAD SRL_HDR_POS SRL_HDR_POS_HIGH
779 SRL_HDR_POS_LOW SRL_HDR_REFN SRL_HDR_REFP SRL_HDR_REGEXP
780 SRL_HDR_RESERVED SRL_HDR_RESERVED_HIGH SRL_HDR_RESERVED_LOW
781 SRL_HDR_SHORT_BINARY SRL_HDR_SHORT_BINARY_HIGH
782 SRL_HDR_SHORT_BINARY_LOW SRL_HDR_STR_UTF8 SRL_HDR_TRACK_FLAG
783 SRL_HDR_TRUE SRL_HDR_UNDEF SRL_HDR_VARINT SRL_HDR_WEAKEN
784 SRL_HDR_ZIGZAG SRL_MAGIC_STRING_HIGHBIT_UINT_BE
785 SRL_MAGIC_STRING_HIGHBIT_UINT_LE
786 SRL_MAGIC_STRING_HIGHBIT_UTF8_UINT_BE
787 SRL_MAGIC_STRING_HIGHBIT_UTF8_UINT_LE SRL_MAGIC_STRING_UINT_BE
788 SRL_MAGIC_STRING_UINT_LE SRL_MAGIC_STRLEN
789 SRL_MASK_ARRAYREF_COUNT SRL_MASK_HASHREF_COUNT
790 SRL_MASK_SHORT_BINARY_LEN SRL_NEG_MIN_SIZE SRL_POS_MAX_SIZE
791 SRL_PROTOCOL_ENCODING_MASK SRL_PROTOCOL_ENCODING_RAW
792 SRL_PROTOCOL_ENCODING_SNAPPY
793 SRL_PROTOCOL_ENCODING_SNAPPY_INCREMENTAL
794 SRL_PROTOCOL_ENCODING_ZLIB SRL_PROTOCOL_HDR_CONTINUE
795 SRL_PROTOCOL_HDR_USER_DATA SRL_PROTOCOL_VERSION
796 SRL_PROTOCOL_VERSION_BITS SRL_PROTOCOL_VERSION_MASK));
797  
798 print constant_types(), "\n"; # macro defs
799 foreach (C_constant ("Sereal::Splitter::Constants", 'constant', 'IV', $types, undef, 3, @names) ) {
800 print $_, "\n"; # C constant subs
801 }
802 print "\n#### XS Section:\n";
803 print XS_constant ("Sereal::Splitter::Constants", $types);
804 __END__
« blib/lib/Sereal/Splitter.pm ↑ Summary const-xs.inc »