Skip to content

Commit 26262ed

Browse files
committed
embed.pl: enum and union are like struct in parameters
These keywords all need another word to indicate the parameter type. Previously only 'struct' was considered to have. This changed showed an error in one entry embed.fnc, which is also corrected in this commit.
1 parent a8708c8 commit 26262ed

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

embed.fnc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2688,7 +2688,7 @@ CTp |Signal_t|perly_sighandler \
26882688
|bool safe
26892689

26902690
Admp |const char * const|phase_name \
2691-
|enum perl_phase
2691+
|enum perl_phase phase
26922692
Adp |void |pmop_dump |NULLOK PMOP *pm
26932693
: Used in perly.y
26942694
p |OP * |pmruntime |NN OP *o \

proto.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

regen/embed.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ sub generate_proto_h {
368368

369369
my $temp_arg = $arg;
370370
$temp_arg =~ s/\*//g;
371-
$temp_arg =~ s/\s*\bstruct\b\s*/ /g;
371+
$temp_arg =~
372+
s/ \s* \b ( struct | enum | union ) \b \s*/ /xg;
372373
if ( ($temp_arg ne "...")
373374
&& ($temp_arg !~ /\w+\s+(\w+)(?:\[\d+\])?\s*$/) ) {
374375
die_at_end "$func: $arg ($n) doesn't have a name\n";

0 commit comments

Comments
 (0)