|
833 | 833 | EOF
|
834 | 834 | }
|
835 | 835 |
|
836 |
| - # Emit any lines derived from BOOT: sections. By putting the lines back |
837 |
| - # into $self->{line} and passing them through print_section(), |
838 |
| - # a trailing '#line' may be emitted to effect the change back to the |
839 |
| - # current foo.c line from the foo.xs part where the BOOT: code was. |
| 836 | + # Emit any lines derived from BOOT: sections |
840 | 837 |
|
841 | 838 | if (@{ $self->{bootcode_later} }) {
|
842 | 839 | print "\n /* Initialisation Section */\n\n";
|
@@ -909,41 +906,6 @@ sub check_keyword {
|
909 | 906 | }
|
910 | 907 |
|
911 | 908 |
|
912 |
| -# Emit, verbatim(ish), all the lines up till the next directive. |
913 |
| -# Typically used for sections that have blocks of code, like CODE. Return |
914 |
| -# a string which contains all the lines of code emitted except for the |
915 |
| -# extra '#line' type stuff. |
916 |
| - |
917 |
| -sub print_section { |
918 |
| - my ExtUtils::ParseXS $self = shift; |
919 |
| - |
920 |
| - # Strip leading blank lines. The "do" is required for the right semantics |
921 |
| - do { $_ = shift(@{ $self->{line} }) } while !/\S/ && @{ $self->{line} }; |
922 |
| - |
923 |
| - my $consumed_code = ''; |
924 |
| - |
925 |
| - # Add a '#line' if needed. The XSubPPtmp test is a bit of a hack - it |
926 |
| - # skips synthetic blocks added to boot etc which may not have line |
927 |
| - # numbers. |
928 |
| - print("#line ", $self->{line_no}->[@{ $self->{line_no} } - @{ $self->{line} } -1], " \"", |
929 |
| - escape_file_for_line_directive($self->{in_pathname}), "\"\n") |
930 |
| - if $self->{config_WantLineNumbers} |
931 |
| - && !/^\s*#\s*line\b/ && !/^#if XSubPPtmp/; |
932 |
| - |
933 |
| - # Emit lines until the next directive |
934 |
| - for (; defined($_) && !/^$BLOCK_regexp/o; $_ = shift(@{ $self->{line} })) { |
935 |
| - print "$_\n"; |
936 |
| - $consumed_code .= "$_\n"; |
937 |
| - } |
938 |
| - |
939 |
| - # Emit a "restoring" '#line' |
940 |
| - print 'ExtUtils::ParseXS::CountLines'->end_marker, "\n" |
941 |
| - if $self->{config_WantLineNumbers}; |
942 |
| - |
943 |
| - return $consumed_code; |
944 |
| -} |
945 |
| - |
946 |
| - |
947 | 909 | # Handle BOOT: keyword.
|
948 | 910 | # Save all the remaining lines in the paragraph to the bootcode_later
|
949 | 911 | # array, and prepend a '#line' if necessary.
|
|
0 commit comments