Skip to content

Commit 7eee060

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 edf0c4e commit 7eee060

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
@@ -2691,7 +2691,7 @@ CTp |Signal_t|perly_sighandler \
26912691
|bool safe
26922692

26932693
Admp |const char * const|phase_name \
2694-
|enum perl_phase
2694+
|enum perl_phase phase
26952695
Adp |void |pmop_dump |NULLOK PMOP *pm
26962696
: Used in perly.y
26972697
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
@@ -374,7 +374,8 @@ sub generate_proto_h {
374374

375375
my $temp_arg = $arg;
376376
$temp_arg =~ s/\*//g;
377-
$temp_arg =~ s/\s*\bstruct\b\s*/ /g;
377+
$temp_arg =~
378+
s/ \s* \b ( struct | enum | union ) \b \s*/ /xg;
378379
if ( ($temp_arg ne "...")
379380
&& ($temp_arg !~ /\w+\s+(\w+)(?:\[\d+\])?\s*$/) ) {
380381
die_at_end "$func: $arg ($n) doesn't have a name\n";

0 commit comments

Comments
 (0)