Commit 25dd99d
committed
ParseXS: allow XS files with no XS again
GH #24016
ParseXS / xsubpp allowed .xs files to contain only C code; i.e. no XS
code. A warning was issued about about a missing MODULE line, but the C
contents of the file was emitted as-is.
My recent refactoring broke this - it was now generating a C code file
with zero lines. This was because ParseXS now splits the parsing and
code-emitting into two separate phases, and this code during parsing:
warn "Didn't find a 'MODULE ... PACKAGE ... PREFIX' line\n";
exit 0; # Not a fatal error for the caller process
was now exiting before any lines had been emitted.
The fix is to not suddenly exit, but instead continue with pared-down
parsing and code emitting.1 parent 348b9e8 commit 25dd99d
File tree
2 files changed
+31
-3
lines changed- dist/ExtUtils-ParseXS
- lib/ExtUtils/ParseXS
- t
2 files changed
+31
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | | - | |
607 | | - | |
| 606 | + | |
608 | 607 | | |
609 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
610 | 614 | | |
611 | 615 | | |
612 | 616 | | |
| |||
752 | 756 | | |
753 | 757 | | |
754 | 758 | | |
755 | | - | |
| 759 | + | |
756 | 760 | | |
757 | 761 | | |
758 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5879 | 5879 | | |
5880 | 5880 | | |
5881 | 5881 | | |
| 5882 | + | |
| 5883 | + | |
| 5884 | + | |
| 5885 | + | |
| 5886 | + | |
| 5887 | + | |
| 5888 | + | |
| 5889 | + | |
| 5890 | + | |
| 5891 | + | |
| 5892 | + | |
| 5893 | + | |
| 5894 | + | |
| 5895 | + | |
| 5896 | + | |
| 5897 | + | |
| 5898 | + | |
| 5899 | + | |
| 5900 | + | |
| 5901 | + | |
| 5902 | + | |
| 5903 | + | |
| 5904 | + | |
| 5905 | + | |
5882 | 5906 | | |
0 commit comments