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
|
|
|
|
|
|
|
# METHOD: sourcify |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# WRITTEN BY: Marcus Holland-Moritz ON: Oct 2002 |
15
|
|
|
|
|
|
|
# CHANGED BY: ON: |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
################################################################################ |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
SV * |
20
|
|
|
|
|
|
|
CBC::sourcify(...) |
21
|
|
|
|
|
|
|
PREINIT: |
22
|
974
|
|
|
|
|
|
CBC_METHOD(sourcify); |
23
|
|
|
|
|
|
|
SourcifyConfig sc; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
CODE: |
26
|
|
|
|
|
|
|
CT_DEBUG_METHOD; |
27
|
|
|
|
|
|
|
|
28
|
974
|
100
|
|
|
|
|
CHECK_PARSE_DATA; |
29
|
968
|
100
|
|
|
|
|
CHECK_VOID_CONTEXT; |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
/* preset with defaults */ |
32
|
962
|
|
|
|
|
|
sc.context = 0; |
33
|
962
|
|
|
|
|
|
sc.defines = 0; |
34
|
|
|
|
|
|
|
|
35
|
962
|
100
|
|
|
|
|
if (items == 2 && SvROK(ST(1))) |
|
|
100
|
|
|
|
|
|
36
|
917
|
|
|
|
|
|
{ |
37
|
929
|
|
|
|
|
|
SV *sv = SvRV(ST(1)); |
38
|
|
|
|
|
|
|
|
39
|
929
|
100
|
|
|
|
|
if (SvTYPE(sv) == SVt_PVHV) |
40
|
923
|
|
|
|
|
|
get_sourcify_config(aTHX_ (HV *) sv, &sc); |
41
|
|
|
|
|
|
|
else |
42
|
6
|
|
|
|
|
|
Perl_croak(aTHX_ "Need a hash reference for configuration options"); |
43
|
|
|
|
|
|
|
} |
44
|
33
|
100
|
|
|
|
|
else if (items >= 2) |
45
|
18
|
|
|
|
|
|
Perl_croak(aTHX_ "Sourcification of individual types is not yet supported"); |
46
|
|
|
|
|
|
|
|
47
|
932
|
|
|
|
|
|
RETVAL = get_parsed_definitions_string(aTHX_ &THIS->cpi, &sc); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
OUTPUT: |
50
|
|
|
|
|
|
|
RETVAL |
51
|
|
|
|
|
|
|
|