Skip to content

Commit c3a0c7d

Browse files
committed
regen/embed.pl: Add checks that O flag used correctly
And add some comments in embed.fnc
1 parent 39d047f commit c3a0c7d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

embed.fnc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,9 +620,11 @@
620620
:
621621
: 'O' Has a perl_ compatibility macro.
622622
:
623-
: The really OLD name for API funcs.
623+
: The really OLD name for API funcs. These now also require the 'p'
624+
: flag so as to generate a modern name. Obviously no new entries
625+
: should get this flag.
624626
:
625-
: autodoc.pl adds a note that the perl_ form of this function is
627+
: autodoc.pl adds a note that the 'perl_' form of this function is
626628
: deprecated.
627629
:
628630
: 'o' Has no Perl_foo or S_foo compatibility macro:

regen/embed.pl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ sub generate_proto_h {
155155
die_at_end "flag $1 is not legal (for function $plain_func)";
156156
}
157157

158+
if ($flags =~ /O/) {
159+
die_at_end "$plain_func: O flag requires p flag" if $flags !~ /p/;
160+
die_at_end "$plain_func: O flag forbids T flag" if $flags =~ /T/;
161+
}
162+
158163
my @nonnull;
159164
my $args_assert_line = ( $flags !~ /m/ );
160165
my $has_depth = ( $flags =~ /W/ );

0 commit comments

Comments
 (0)