| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
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
|
|
|
|
|
|
|
# FUNCTION: feature |
|
13
|
|
|
|
|
|
|
# |
|
14
|
|
|
|
|
|
|
# WRITTEN BY: Marcus Holland-Moritz ON: Mar 2002 |
|
15
|
|
|
|
|
|
|
# CHANGED BY: ON: |
|
16
|
|
|
|
|
|
|
# |
|
17
|
|
|
|
|
|
|
################################################################################ |
|
18
|
|
|
|
|
|
|
# |
|
19
|
|
|
|
|
|
|
# DESCRIPTION: Check if the module was compiled with a certain feature. |
|
20
|
|
|
|
|
|
|
# |
|
21
|
|
|
|
|
|
|
################################################################################ |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
void |
|
24
|
|
|
|
|
|
|
feature(...) |
|
25
|
|
|
|
|
|
|
PREINIT: |
|
26
|
48
|
|
|
|
|
|
CBC_METHOD(feature); |
|
27
|
|
|
|
|
|
|
int method_call; |
|
28
|
|
|
|
|
|
|
const char *feat; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
PPCODE: |
|
31
|
48
|
100
|
|
|
|
|
method_call = items > 0 && sv_isobject(ST(0)); |
|
|
|
100
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
|
33
|
48
|
100
|
|
|
|
|
if (items != (method_call ? 2 : 1)) |
|
|
|
100
|
|
|
|
|
|
|
34
|
24
|
|
|
|
|
|
Perl_croak(aTHX_ "Usage: Convert::Binary::C::feature(feat)"); |
|
35
|
|
|
|
|
|
|
|
|
36
|
24
|
100
|
|
|
|
|
CHECK_VOID_CONTEXT; |
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
12
|
50
|
|
|
|
|
feat = (const char *)SvPV_nolen(ST(items-1)); |
|
39
|
|
|
|
|
|
|
|
|
40
|
12
|
|
|
|
|
|
switch (*feat) |
|
41
|
|
|
|
|
|
|
{ |
|
42
|
|
|
|
|
|
|
case 'd': |
|
43
|
6
|
50
|
|
|
|
|
if (strEQ(feat, "debug")) |
|
44
|
|
|
|
|
|
|
#ifdef CBC_DEBUGGING |
|
45
|
|
|
|
|
|
|
XSRETURN_YES; |
|
46
|
|
|
|
|
|
|
#else |
|
47
|
6
|
|
|
|
|
|
XSRETURN_NO; |
|
48
|
|
|
|
|
|
|
#endif |
|
49
|
0
|
|
|
|
|
|
break; |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
case 'i': |
|
52
|
5
|
50
|
|
|
|
|
if (strEQ(feat, "ieeefp")) |
|
53
|
|
|
|
|
|
|
#ifdef CBC_HAVE_IEEE_FP |
|
54
|
5
|
|
|
|
|
|
XSRETURN_YES; |
|
55
|
|
|
|
|
|
|
#else |
|
56
|
|
|
|
|
|
|
XSRETURN_NO; |
|
57
|
|
|
|
|
|
|
#endif |
|
58
|
0
|
|
|
|
|
|
break; |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
1
|
|
|
|
|
|
XSRETURN_UNDEF; |
|
62
|
|
|
|
|
|
|
|