Skip to content

Commit 21f5277

Browse files
committed
regen/embed.pl: Generate ARGS_ASSERT in more cases
This macro is actually always generated, but is empty if there are no assertions needed. But until this commit the code could wrongly create an empty macro. This happened unless at least one of the arguments to the function was marked NN.
1 parent d3987f4 commit 21f5277

File tree

2 files changed

+40
-20
lines changed

2 files changed

+40
-20
lines changed

proto.h

Lines changed: 38 additions & 18 deletions
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ sub generate_proto_h {
362362
$ret .= ";";
363363
$ret = "/* $ret */" if $has_mflag;
364364

365-
if ($args_assert_line || @names_of_nn) {
365+
if ($args_assert_line || @names_of_nn || @typed_args) {
366366
$ret .= "\n#${ind}define PERL_ARGS_ASSERT_\U$plain_func\E";
367-
if (@names_of_nn) {
367+
if (@names_of_nn || @typed_args) {
368368
$ret .= " \\\n";
369369

370370
my @asserts;

0 commit comments

Comments
 (0)