Skip to content

Commit

Permalink
regen/embed.pl: G flag mean NN, NULLOK not reqd
Browse files Browse the repository at this point in the history
The G flag for a function indicates to not generate a PERL_ARGS_ASSERT
macro for the function.  This macro is the only consumer of the NN and
NULLOK indicators to pointer arguments.  Since the consumer is absent,
there is no need for them, and they shouldn't be required.

This commit does not change the check that If a NN is furnished, the G
flag is illegal.
  • Loading branch information
khwilliamson committed Apr 14, 2021
1 parent e73c00e commit 99eff29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion regen/embed.pl
Expand Up @@ -165,7 +165,10 @@ sub open_print_header {
my $n;
for my $arg ( @args ) {
++$n;
if ( $arg =~ /\*/ && $arg !~ /\b(NN|NULLOK)\b/ ) {
if ( $args_assert_line
&& $arg =~ /\*/
&& $arg !~ /\b(NN|NULLOK)\b/ )
{
warn "$func: $arg needs NN or NULLOK\n";
++$unflagged_pointers;
}
Expand Down

0 comments on commit 99eff29

Please sign in to comment.