Skip to content

Commit 731f586

Browse files
committed
regen/embed.pl: White-space/comment changes
This removes a misleading comment. NULLOK now does have some effect. It changes the actual generated assertion for arguments where a type assertion is generated. (This has actually been true since 2463f19) This also vertically aligns some statements for ease of reading, and reorders things to group them together in a block.
1 parent bcfaa3e commit 731f586

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

regen/embed.pl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,14 @@ sub generate_proto_h {
252252
warn "$func: $arg needs NN or NULLOK\n";
253253
++$unflagged_pointers;
254254
}
255-
my $nn = ( $arg =~ s/\s*\bNN\b\s+// );
256-
push( @nonnull, $n ) if $nn;
257-
my $nz = ( $arg =~ s/\s*\bNZ\b\s+// );
258-
259-
my $nullok = ( $arg =~ s/\s*\bNULLOK\b\s+// ); # strip NULLOK with no effect
260255

256+
my $nn = ( $arg =~ s/\s*\bNN\b\s+// );
257+
my $nz = ( $arg =~ s/\s*\bNZ\b\s+// );
258+
my $nullok = ( $arg =~ s/\s*\bNULLOK\b\s+// );
261259
my $nocheck = ( $arg =~ s/\s*\bNOCHECK\b\s+// );
262260

261+
push( @nonnull, $n ) if $nn;
262+
263263
# Make sure each arg has at least a type and a var name.
264264
# An arg of "int" is valid C, but want it to be "int foo".
265265
my $argtype = ( $arg =~ m/^(\w+(?:\s*\*+)?)/ )[0];

0 commit comments

Comments
 (0)