line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# [[[ HEADER ]]] |
2
|
|
|
|
|
|
|
package RPerl::DataType::String_cpp; |
3
|
1
|
|
|
1
|
|
734
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
20
|
|
5
|
1
|
|
|
1
|
|
4
|
use RPerl::AfterSubclass; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
119
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.002_000; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# [[[ CRITICS ]]] |
9
|
|
|
|
|
|
|
## no critic qw(ProhibitStringyEval) # SYSTEM DEFAULT 1: allow eval() |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# [[[ INCLUDES ]]] |
12
|
1
|
|
|
1
|
|
6
|
use RPerl::Inline; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
179
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# [[[ SUBROUTINES ]]] |
15
|
|
|
|
|
|
|
sub cpp_load { |
16
|
2
|
|
|
2
|
|
11
|
{ my void::method $RETURN_TYPE }; |
|
2
|
|
|
|
|
9
|
|
17
|
2
|
|
|
|
|
10
|
my $need_load_cpp = 0; |
18
|
2
|
50
|
33
|
|
|
24
|
if ( ( exists $main::{'RPerl__DataType__String__MODE_ID'} ) |
19
|
0
|
|
|
|
|
0
|
and ( defined &{ $main::{'RPerl__DataType__String__MODE_ID'} } ) ) |
20
|
|
|
|
|
|
|
{ |
21
|
|
|
|
|
|
|
# RPerl::diag("in String_cpp::cpp_load, RPerl__DataType__String__MODE_ID() exists & defined\n"); |
22
|
|
|
|
|
|
|
# RPerl::diag(q{in String_cpp::cpp_load, have RPerl__DataType__String__MODE_ID() retval = '} . main::RPerl__DataType__String__MODE_ID() . "'\n"); |
23
|
0
|
0
|
|
|
|
0
|
if ( $RPerl::MODES->{main::RPerl__DataType__String__MODE_ID()}->{ops} ne 'CPP' ) { |
24
|
0
|
|
|
|
|
0
|
$need_load_cpp = 1; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
else { |
28
|
|
|
|
|
|
|
# RPerl::diag("in String_cpp::cpp_load, RPerl__DataType__String__MODE_ID() does not exist or undefined\n"); |
29
|
2
|
|
|
|
|
9
|
$need_load_cpp = 1; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
2
|
50
|
|
|
|
13
|
if ($need_load_cpp) { |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# RPerl::diag("in String_cpp::cpp_load, need load CPP code\n"); |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
12
|
my $eval_string = <<"EOF"; |
37
|
|
|
|
|
|
|
package main; |
38
|
|
|
|
|
|
|
use RPerl::Inline; |
39
|
|
|
|
|
|
|
BEGIN { RPerl::diag("[[[ BEGIN 'use Inline' STAGE for 'RPerl/DataType/String.cpp' ]]]\n" x 0); } |
40
|
|
|
|
|
|
|
use Inline (CPP => '$RPerl::INCLUDE_PATH' . '/RPerl/DataType/String.cpp', \%RPerl::Inline::ARGS); |
41
|
|
|
|
|
|
|
RPerl::diag("[[[ END 'use Inline' STAGE for 'RPerl/DataType/String.cpp' ]]]\n" x 0); |
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
EOF |
44
|
|
|
|
|
|
|
|
45
|
2
|
|
|
|
|
20
|
$RPerl::Inline::ARGS{ccflagsex} = $RPerl::Inline::CCFLAGSEX . $RPerl::TYPES_CCFLAG . rperltypessizes::type_integer_native_ccflag() . rperltypessizes::type_number_native_ccflag(); |
46
|
2
|
|
|
|
|
12
|
$RPerl::Inline::ARGS{cppflags} = $RPerl::TYPES_CCFLAG . rperltypessizes::type_integer_native_ccflag() . rperltypessizes::type_number_native_ccflag(); |
47
|
|
|
|
|
|
|
# RPerl::diag("in String_cpp::cpp_load(), CPP not yet loaded, about to call eval() on \$eval_string =\n<<< BEGIN EVAL STRING>>>\n" . $eval_string . "<<< END EVAL STRING >>>\n"); |
48
|
|
|
|
|
|
|
|
49
|
1
|
50
|
|
1
|
|
11
|
eval $eval_string or croak( $OS_ERROR . "\n" . $EVAL_ERROR ); |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
1
|
|
46
|
|
|
1
|
|
|
1
|
|
7
|
|
|
1
|
|
|
1
|
|
8
|
|
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
45
|
|
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
180
|
|
50
|
2
|
50
|
|
|
|
20
|
if ($EVAL_ERROR) { croak($EVAL_ERROR); } |
|
0
|
|
|
|
|
0
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# else { RPerl::diag("in String_cpp::cpp_load(), CPP already loaded, DOING NOTHING\n"); } |
54
|
2
|
|
|
|
|
55
|
return; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; # end of package |