Skip to content

Conversation

@iabyn
Copy link
Contributor

@iabyn iabyn commented Dec 20, 2025

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.

  • This set of changes does not require a perldelta entry.

@jkeenan
Copy link
Contributor

jkeenan commented Dec 20, 2025

I can confirm that this would fix GH #24016.

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.
@iabyn iabyn merged commit 25dd99d into blead Dec 21, 2025
67 checks passed
@iabyn iabyn deleted the davem/xs_no_mod branch December 21, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants