line | % | coverage | branch |
46 | 50 | T | F | @_ % 2 ? : |
71 | 50 | T | F | if ($^O eq 'VMS') |
95 | 50 | T | F | $args{'except'} ? : |
100 | 100 | T | F | ref $args{'typemap'} ? : |
106 | 50 | T | F | unless $_ |
114 | 50 | T | F | unless open $FH, $args{'filename'} |
118 | 100 | T | F | if (not ref $args{'output'}) |
119 | 50 | T | F | unless open my $fh, "> $args{'output'}" |
133 | 50 | T | F | if ($WantLineNumbers) { } |
135 | 100 | T | F | if ($args{'outfile'}) { } |
140 | 50 | T | F | unless $cfile =~ s/\.xs$/$csuffix/i |
150 | 50 | T | F | unless -r $typemap |
156 | 100 | T | F | unless -f $typemap |
158 | 50 | T | F | unless -T $typemap |
160 | 50 | T | F | unless open TYPEMAP, $typemap |
167 | 50 | T | F | if /^\s* #/ |
169 | 100 | T | F | if (/^INPUT\s*$/) |
172 | 100 | T | F | if (/^OUTPUT\s*$/) |
175 | 100 | T | F | if (/^TYPEMAP\s*$/) |
178 | 100 | T | F | if ($mode eq 'Typemap') { } |
| 100 | T | F | elsif (/^\s/) { } |
| 100 | T | F | elsif ($mode eq 'Input') { } |
183 | 100 | T | F | if /^$/ or /^#/ |
184 | 50 | T | F | unless my($type, $kind, $proto) = /^\s*(.*?\S)\s+(\S+)\s*($proto_re*)\s*$/ |
190 | 50 | T | F | unless $proto |
191 | 50 | T | F | unless &ValidProtoString($proto) |
240 | 100 | T | F | if $t |
277 | 50 | T | F | if $WantLineNumbers |
282 | 50 | T | F | if (/^=/) |
285 | 0 | T | F | if (/^=cut\s*$/) |
300 | 0 | T | F | if $WantLineNumbers |
308 | 0 | T | F | unless $lastline |
311 | 100 | T | F | if ($Package, $Prefix) = /^MODULE\s*=\s*[\w:]+(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/ |
316 | 50 | T | F | unless (defined $_) |
321 | 50 | T | F | if $WantLineNumbers |
371 | 50 | T | F | if $WantLineNumbers |
386 | 0 | T | F | unless $line =~ /^\#\s*((if)(?:n?def)?|elsif|else|endif)\b/ |
388 | 0 | T | F | if ($statement eq 'if') { } |
393 | 0 | T | F | if $XSStack[-1]{'type'} ne 'if' |
395 | 0 | T | F | if ($XSStack[-1]{'varname'}) |
401 | 0 | T | F | if ($statement ne 'endif') { } |
417 | 100 | T | F | unless @line |
419 | 50 | T | F | if ($XSS_work_idx and not $XSStack[$XSS_work_idx]{'varname'}) |
427 | 50 | T | F | if $line[0] =~ /^\s/ |
461 | 50 | T | F | unless @line |
465 | 50 | T | F | if (check_keyword('BOOT')) |
467 | 0 | T | F | if $WantLineNumbers and not $line[0] =~ /^\s*#\s*line\b/ |
476 | 50 | T | F | if $ret_type =~ s/^NO_OUTPUT\s+// |
479 | 50 | T | F | if $process_argtypes and $ret_type =~ s/^(.*?\w.*?)\s*\b(\w+\s*\(.*)/$1/s |
484 | 50 | T | F | unless @line |
487 | 50 | T | F | if $ret_type =~ s/^extern "C"\s+// |
488 | 50 | T | F | if $ret_type =~ s/^static\s+// |
491 | 50 | T | F | unless $func_header =~ /^(?:([\w:]*)::)?(\w+)\s*\(\s*(.*?)\s*\)\s*(const)?\s*(;\s*)?$/s |
496 | 50 | T | F | if $4 |
501 | 50 | T | F | if ($Is_VMS) |
507 | 50 | T | F | unless defined $$tmp{'functions'}{$Full_func_name} |
519 | 100 | T | F | if ($process_argtypes and $orig_args =~ /\S/) { } |
521 | 50 | T | F | if ($args =~ /^( (??{ $C_arg }) , )* $ /x) { } |
530 | 100 | T | F | unless defined $pre and length $pre |
533 | 50 | T | F | if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//) |
535 | 0 | T | F | if $type ne 'IN' |
540 | 50 | T | F | if ($name =~ /^length\( \s* (\w+) \s* \)\z/x) |
543 | 0 | T | F | if length $default |
546 | 50 | T | F | if (length $pre or $islength) |
547 | 50 | T | F | if ($islength) { } |
557 | 50 | T | F | if $out_type eq 'OUTLIST' or $islength |
558 | 50 | T | F | if $out_type =~ /OUTLIST$/ |
559 | 50 | T | F | if $out_type |
570 | 0 | T | F | if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|IN_OUT|OUT)\s+//) |
572 | 0 | T | F | if $out_type eq 'IN' |
573 | 0 | T | F | if $out_type eq 'OUTLIST' |
575 | 0 | T | F | if $out_type =~ /OUTLIST$/ |
580 | 100 | T | F | if (defined $class) |
581 | 100 | T | F | defined $static || $func_name eq 'new' ? : |
590 | 100 | T | F | if ($args[$i] =~ s/\.\.\.//) |
592 | 50 | T | F | if ($args[$i] eq '' and $i == $#args) |
598 | 50 | T | F | if ($only_C_inlist{$args[$i]}) { } |
605 | 100 | T | F | if ($args[$i] =~ /^([^=]*[^\s=])\s*=\s*(.*)/s) |
617 | 100 | T | F | if defined $class |
620 | 50 | T | F | if $in_out{$_} |
634 | 50 | T | F | if $EXPLICIT_RETURN |
636 | 50 | T | F | $externC ? : |
650 | 100 | T | F | if $ALIAS |
653 | 100 | T | F | if $INTERFACE |
656 | 100 | T | F | if ($ellipsis) { } |
| 100 | T | F | elsif ($min_args == $num_args) { } |
657 | 100 | T | F | $min_args ? : |
666 | 50 | T | F | if $except |
671 | 100 | T | F | if ($cond) { } |
689 | 100 | T | F | if $PPCODE |
693 | 100 | T | F | if $PPCODE |
706 | 50 | T | F | if check_keyword('CASE') |
721 | 50 | T | F | if $ScopeThisXSUB |
726 | 100 | T | F | if (not $thisdone and defined $class) |
727 | 100 | T | F | if (defined $static or $func_name eq 'new') { } |
740 | 50 | T | F | if (/^\s*NOT_IMPLEMENTED_YET/) { } |
745 | 100 | T | F | if ($ret_type ne 'void') |
746 | 50 | T | F | if not $retvaldone |
750 | 100 | T | F | if $WantOptimize and $targetable{$type_kind{$ret_type}} |
754 | 100 | T | F | if (@fake_INPUT or @fake_INPUT_pre) |
764 | 100 | T | F | if (check_keyword('PPCODE')) { } |
| 100 | T | F | elsif (check_keyword('CODE')) { } |
| 100 | T | F | elsif (defined $class and $func_name eq 'DESTROY') { } |
766 | 50 | T | F | if @line |
767 | 50 | T | F | if $ScopeThisXSUB |
779 | 100 | T | F | if ($ret_type ne 'void') |
783 | 50 | T | F | if (defined $static) { } |
| 100 | T | F | elsif (defined $class) { } |
784 | 0 | T | F | if ($func_name eq 'new') { } |
792 | 50 | T | F | if ($func_name eq 'new') { } |
799 | 50 | T | F | if exists $args{'s'} |
801 | 100 | T | F | if $interface |
810 | 50 | T | F | if $RETVAL_no_return |
818 | 50 | T | F | if ($gotRETVAL and $RETVAL_code) { } |
| 100 | T | F | elsif ($gotRETVAL or $wantRETVAL) { } |
827 | 100 | T | F | if ($t and not $$t[1] and $$t[0] eq 'p') { } |
| 100 | T | F | elsif ($t) { } |
830 | 50 | T | F | if $@ |
837 | 50 | T | F | if $@ |
840 | 50 | T | F | unless defined $size |
842 | 50 | T | F | if $@ |
852 | 100 | T | F | if $ret_type ne 'void' |
855 | 50 | T | F | if $c and not $prepush_done |
856 | 50 | T | F | if $c |
863 | 50 | T | F | if $ScopeThisXSUB |
866 | 50 | T | F | if $ScopeThisXSUB and not $PPCODE |
874 | 50 | T | F | if $except |
880 | 50 | T | F | if (check_keyword('CASE')) |
881 | 0 | T | F | unless $condnum |
886 | 50 | T | F | if $_ eq "${END}:" |
887 | 0 | T | F | /^$BLOCK_re/o ? : |
890 | 50 | T | F | if $except |
895 | 100 | T | F | if ($xsreturn) { } |
896 | 50 | T | F | unless $PPCODE |
901 | 100 | T | F | unless $PPCODE |
915 | 100 | T | F | if ($ProtoThisXSUB) |
918 | 50 | T | F | if ($ProtoThisXSUB eq 2) { } |
| 50 | T | F | elsif ($ProtoThisXSUB eq 1) { } |
923 | 50 | T | F | if ($min_args < $num_args) |
927 | 50 | T | F | if $ellipsis |
938 | 100 | T | F | if (%XsubAliases) { } |
| 50 | T | F | elsif (@Attributes) { } |
| 100 | T | F | elsif ($interface) { } |
939 | 50 | T | F | unless defined $XsubAliases{$pname} |
946 | 50 | T | F | if $proto |
959 | 50 | T | F | unless $name =~ /::/ |
964 | 50 | T | F | if $proto |
976 | 50 | T | F | if ($Overload) |
1019 | 50 | T | F | $] < 5.009 ? : |
1023 | 50 | T | F | if $Full_func_name |
1034 | 50 | T | F | if $WantVersionChk |
1039 | 100 | T | F | if defined $XsubAliases or defined $Interfaces |
1045 | 50 | T | F | if $Overload |
1059 | 100 | T | F | if defined $XsubAliases or defined $Interfaces |
1063 | 50 | T | F | if (@BootCode) |
1070 | 50 | T | F | if ($] >= 5.009) |
1083 | 50 | T | F | unless $ProtoUsed |
1088 | 50 | T | F | if tied *PSEUDO_STDOUT |
1108 | 100 | T | F | if -e $file |
1138 | 100 | T | F | if s/^(\s*)($_[0])\s*:\s*(?:#.*)?/$1/s |
1145 | 50 | T | F | if $WantLineNumbers and not /^\s*#\s*line\b/ and not /^#if XSubPPtmp/ |
1150 | 50 | T | F | if $WantLineNumbers |
1177 | 0 | T | F | if $condnum and $cond eq '' |
1181 | 0 | T | F | $condnum++ ? : |
| 0 | T | F | $cond ? : |
1187 | 50 | T | F | if /^\s*NOT_IMPLEMENTED_YET/ |
1188 | 100 | T | F | unless /\S/ |
1194 | 50 | T | F | unless /[=;+].*\S/ |
1197 | 50 | T | F | if (s/^([^=]*)\blength\(\s*(\w+)\s*\)\s*$/$1 XSauto_length_of_$2=NO_INIT/x) |
1206 | 50 | T | F | if s/\s*([=;+].*)$//s |
1210 | 50 | T | F | unless my($var_type, $var_addr, $var_name) = /^(.*?[^&\s])\s*(\&?)\s*\b(\w+)$/s |
1214 | 50 | T | F | if $arg_list{$var_name}++ or defined $argtype_seen{$var_name} and not $processing_arg_with_types |
1225 | 50 | T | F | if ($var_type =~ / \( \s* \* \s* \) /x) { } |
1236 | 50 | T | F | if $var_num |
1238 | 50 | T | F | if $var_addr |
1239 | 50 | T | F | if ($var_init =~ /^[=;]\s*NO_INIT\s*;?\s*$/ or $in_out{$var_name} and $in_out{$var_name} =~ /^OUT/ and not $var_init =~ /\S/) { } |
| 50 | T | F | elsif ($var_init =~ /\S/) { } |
| 50 | T | F | elsif ($var_num) { } |
1243 | 0 | T | F | if ($name_printed) { } |
1265 | 100 | T | F | unless /\S/ |
1266 | 50 | T | F | if (/^\s*SETMAGIC\s*:\s*(ENABLE|DISABLE)\s*/) |
1267 | 0 | T | F | $1 eq 'ENABLE' ? : |
1271 | 50 | T | F | if $outargs{$outarg}++ |
1273 | 50 | T | F | if (not $gotRETVAL and $outarg eq 'RETVAL') |
1279 | 0 | T | F | unless defined $args_match{$outarg} |
1281 | 0 | T | F | unless defined $var_types{$outarg} |
1284 | 0 | T | F | if ($outcode) { } |
1286 | 0 | T | F | if $DoSetMagic |
1291 | 0 | T | F | if exists $in_out{$outarg} and $in_out{$outarg} =~ /OUT$/ |
1307 | 0 | T | F | if ($in =~ /\s/) { } |
1356 | 100 | T | F | if not $alias =~ /::/ |
1359 | 50 | T | F | if defined $XsubAliases{$alias} |
1362 | 50 | T | F | if $XsubAliasValues{$value} |
1370 | 50 | T | F | if $line |
1376 | 0 | T | F | unless /\S/ |
1384 | 100 | T | F | unless /\S/ |
1386 | 50 | T | F | if $_ |
1392 | 0 | T | F | unless /\S/ |
1395 | 0 | T | F | unless $Overload |
1415 | 0 | T | F | unless exists $map{uc $_} |
1427 | 0 | T | F | unless $Ver |
1431 | 0 | T | F | unless $Ver =~ /^\d+(\.\d*)?/ |
1434 | 0 | T | F | unless $VERSION >= $Ver |
1445 | 0 | T | F | unless /^(ENABLE|DISABLE)/i |
1448 | 0 | T | F | if $1 eq 'ENABLE' |
1449 | 0 | T | F | if $1 eq 'DISABLE' |
1456 | 0 | T | F | if $proto_in_this_xsub++ |
1460 | 0 | T | F | unless /\S/ |
1463 | 0 | T | F | if ($_ eq 'DISABLE') { } |
| 0 | T | F | elsif ($_ eq 'ENABLE') { } |
1472 | 0 | T | F | unless ValidProtoString $_ |
1479 | 0 | T | F | unless $specified |
1485 | 0 | T | F | if $scope_in_this_xsub++ |
1489 | 0 | T | F | unless /\S/ |
1491 | 0 | T | F | if ($_ =~ /^DISABLE/i) { } |
| 0 | T | F | elsif ($_ =~ /^ENABLE/i) { } |
1507 | 50 | T | F | unless /^(ENABLE|DISABLE)/i |
1510 | 100 | T | F | if $1 eq 'ENABLE' |
1511 | 100 | T | F | if $1 eq 'DISABLE' |
1521 | 0 | T | F | unless $_ |
1524 | 0 | T | F | if /^\s*\|/ |
1528 | 0 | T | F | if $IncludedFiles{$_} |
1531 | 0 | T | F | unless /\|\s*$/ |
1548 | 0 | T | F | unless open $FH, "$_" |
1563 | 0 | T | F | unless /^\s*$/ |
1571 | 50 | T | F | unless $XSStack[-1]{'type'} eq 'file' |
1577 | 0 | T | F | unless $isPipe |
1593 | 0 | T | F | if ($isPipe and $?) |
1611 | 50 | T | F | if ($string =~ /^$proto_re+$/) |
1628 | 50 | T | F | unless $proto_letter{$type} |
1633 | 50 | T | F | if (@cpp) |
1636 | 0 | T | F | if ($cpp =~ /^\#\s*if/) { } |
| 0 | T | F | elsif (not $cpplevel) { } |
| 0 | T | F | elsif ($cpp =~ /^\#\s*endif/) { } |
1641 | 0 | T | F | if $XSStack[-1]{'type'} eq 'if' |
1649 | 0 | T | F | if $cpplevel |
1665 | 50 | T | F | if not defined $lastline and $XSStack[-1]{'type'} eq 'if' |
1669 | 100 | T | F | if not defined $lastline |
1671 | 100 | T | F | if ($lastline =~ /^MODULE\s*=\s*([\w:]+)(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/) |
1674 | 50 | T | F | defined $2 ? : |
1675 | 100 | T | F | defined $3 ? : |
1680 | 50 | T | F | if $Packprefix ne '' |
1688 | 0 | T | F | if $lastline =~ /^=cut\s*$/ |
1690 | 0 | T | F | unless $lastline |
1695 | 50 | T | F | if (not $lastline =~ /^\s*#/ or $lastline =~ /^#[ \t]*(?:(?:if|ifn?def|elif|else|endif|define|undef|pragma|error|warning|line\s+\d+|ident)\b|(?:include(?:_next)?|import)\s*["<].*[>"])/) |
1703 | 100 | T | F | if $lastline =~ /^\S/ and @line and $line[-1] eq '' |
1709 | 100 | T | F | unless defined($lastline = <$FH>) |
1728 | 0 | T | F | if ($init =~ /^=/) { } |
1729 | 0 | T | F | if ($name_printed) { } |
1735 | 0 | T | F | if $@ |
1738 | 0 | T | F | if ($init =~ s/^\+// and $num) { } |
| 0 | T | F | elsif ($name_printed) { } |
1747 | 0 | T | F | if $@ |
1751 | 0 | T | F | if $@ |
1780 | 50 | T | F | unless defined $type_kind{$type} |
1786 | 100 | T | F | if $func_name =~ /DESTROY$/ |
1787 | 50 | T | F | if ($tk eq 'T_PV' and exists $lengthof{$var}) |
1788 | 0 | T | F | unless $name_printed |
1790 | 0 | T | F | if defined $defaults{$var} |
1794 | 50 | T | F | unless $hiertype |
1795 | 50 | T | F | unless defined $input_expr{$tk} |
1798 | 50 | T | F | if ($expr =~ /DO_ARRAY_ELEM/) |
1799 | 0 | T | F | unless defined $type_kind{$subtype} |
1801 | 0 | T | F | unless defined $input_expr{$type_kind{$subtype}} |
1812 | 50 | T | F | if ($expr =~ m[/\*.*scope.*\*/]i) |
1815 | 100 | T | F | if (defined $defaults{$var}) { } |
| 100 | T | F | elsif ($ScopeThisXSUB or not $expr =~ /^\s*\$var =/) { } |
1818 | 50 | T | F | if ($name_printed) { } |
1823 | 50 | T | F | if $@ |
1825 | 50 | T | F | if ($defaults{$var} eq 'NO_INIT') { } |
1831 | 50 | T | F | if $@ |
1834 | 50 | T | F | if ($name_printed) { } |
1839 | 50 | T | F | if $@ |
1842 | 50 | T | F | if $@ |
1845 | 50 | T | F | if $name_printed |
1848 | 50 | T | F | if $@ |
1859 | 50 | T | F | if ($type =~ /^array\(([^,]*),(.*)\)/) { } |
1862 | 0 | T | F | if $do_setmagic |
1865 | 50 | T | F | unless defined $type_kind{$type} |
1867 | 50 | T | F | unless defined $output_expr{$type_kind{$type}} |
1873 | 50 | T | F | if ($expr =~ /DO_ARRAY_ELEM/) { } |
| 50 | T | F | elsif ($var eq 'RETVAL') { } |
| 0 | T | F | elsif ($do_push) { } |
| 0 | T | F | elsif ($arg =~ /^ST\(\d+\)$/) { } |
1874 | 0 | T | F | unless defined $type_kind{$subtype} |
1876 | 0 | T | F | unless defined $output_expr{$type_kind{$subtype}} |
1885 | 0 | T | F | if $@ |
1886 | 0 | T | F | if $do_setmagic |
1889 | 50 | T | F | if ($expr =~ /^\t\$arg = new/) { } |
| 50 | T | F | elsif ($expr =~ /^\s*\$arg\s*=/) { } |
1893 | 0 | T | F | if $@ |
1895 | 0 | T | F | if $do_setmagic |
1901 | 0 | T | F | if $@ |
1903 | 0 | T | F | if $do_setmagic |
1912 | 50 | T | F | if $@ |
1920 | 0 | T | F | if $@ |
1921 | 0 | T | F | if $do_setmagic |
1925 | 0 | T | F | if $@ |
1926 | 0 | T | F | if $do_setmagic |
1935 | 50 | T | F | unless $hiertype |
1937 | 100 | T | F | if ($varname) |
1938 | 50 | T | F | if ($varname and $type =~ / \( \s* \* (?= \s* \) ) /gx) { } |