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
|
|
|
|
|
|
|
# CONSTRUCTOR |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# WRITTEN BY: Marcus Holland-Moritz ON: Jan 2002 |
15
|
|
|
|
|
|
|
# CHANGED BY: ON: |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
################################################################################ |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
void |
20
|
|
|
|
|
|
|
CBC::new(...) |
21
|
|
|
|
|
|
|
PREINIT: |
22
|
1364
|
|
|
|
|
|
CBC_METHOD(new); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
PPCODE: |
25
|
|
|
|
|
|
|
CT_DEBUG_METHOD; |
26
|
|
|
|
|
|
|
|
27
|
1364
|
100
|
|
|
|
|
if (items % 2 == 0) |
28
|
2
|
|
|
|
|
|
Perl_croak(aTHX_ "Number of configuration arguments " |
29
|
|
|
|
|
|
|
"to %s must be even", method); |
30
|
|
|
|
|
|
|
else |
31
|
|
|
|
|
|
|
{ |
32
|
|
|
|
|
|
|
int i; |
33
|
1362
|
|
|
|
|
|
CBC *THIS = cbc_new(aTHX); |
34
|
|
|
|
|
|
|
|
35
|
1362
|
100
|
|
|
|
|
if (gs_DisableParser) |
36
|
|
|
|
|
|
|
{ |
37
|
2
|
|
|
|
|
|
Perl_warn(aTHX_ XSCLASS " parser is DISABLED"); |
38
|
2
|
|
|
|
|
|
THIS->cfg.disable_parser = 1; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
/* Only preset the option here, user may explicitly */ |
42
|
|
|
|
|
|
|
/* disable OrderMembers in the constructor */ |
43
|
1362
|
100
|
|
|
|
|
if (gs_OrderMembers) |
44
|
2
|
|
|
|
|
|
THIS->order_members = 1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
/* |
47
|
|
|
|
|
|
|
* bless the new object here, because handle_option() |
48
|
|
|
|
|
|
|
* may croak and DESTROY would not be called to free |
49
|
|
|
|
|
|
|
* the memory that has been allocated |
50
|
|
|
|
|
|
|
*/ |
51
|
1362
|
|
|
|
|
|
ST(0) = sv_2mortal(cbc_bless(aTHX_ THIS, CLASS)); |
52
|
|
|
|
|
|
|
|
53
|
2288
|
100
|
|
|
|
|
for (i = 1; i < items; i += 2) |
54
|
929
|
|
|
|
|
|
handle_option(aTHX_ THIS, ST(i), ST(i+1), NULL, NULL); |
55
|
|
|
|
|
|
|
|
56
|
1359
|
100
|
|
|
|
|
if (gs_OrderMembers && THIS->order_members) |
|
|
100
|
|
|
|
|
|
57
|
1
|
|
|
|
|
|
load_indexed_hash_module(aTHX_ THIS); |
58
|
|
|
|
|
|
|
|
59
|
1359
|
|
|
|
|
|
XSRETURN(1); |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
################################################################################ |
64
|
|
|
|
|
|
|
# |
65
|
|
|
|
|
|
|
# DESTRUCTOR |
66
|
|
|
|
|
|
|
# |
67
|
|
|
|
|
|
|
# WRITTEN BY: Marcus Holland-Moritz ON: Jan 2002 |
68
|
|
|
|
|
|
|
# CHANGED BY: ON: |
69
|
|
|
|
|
|
|
# |
70
|
|
|
|
|
|
|
################################################################################ |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
void |
73
|
|
|
|
|
|
|
CBC::DESTROY() |
74
|
|
|
|
|
|
|
PREINIT: |
75
|
1433
|
|
|
|
|
|
CBC_METHOD(DESTROY); |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
CODE: |
78
|
|
|
|
|
|
|
CT_DEBUG_METHOD; |
79
|
|
|
|
|
|
|
|
80
|
1433
|
|
|
|
|
|
cbc_delete(aTHX_ THIS); |
81
|
|
|
|
|
|
|
|