This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix dup_warnings()
authorKarl Williamson <khw@cpan.org>
Wed, 27 Feb 2019 22:09:07 +0000 (15:09 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 27 Feb 2019 22:27:56 +0000 (15:27 -0700)
commitde59f38ed9c2eb88d97eed5f7ade475479bc3248
tree895d48db996b9ec717a2c8e3bc04e0f6543ecfeb
parente14197aa126e873114b4bb8628ed7afa87557457
Fix dup_warnings()

It turns out that some Configure options cause this to be called with a
NULL parameter. (I didn't check, but my guess is it's threaded builds.)
That means that the embed.fnc entry should be NULLOK for the parameter.
And that means that embed.fnc doesn't generate an ARGS_ASSERT macro, so
that should be removed from the function.

(I actually think it should generate an empty ARGS_ASSERT that could be
included or not, so that code wouldn't have to change if a parameter
became required to be non-null or vice versa.  The porting test would
only check for non-empty macros being present.  But this is for another
day.)

The reason it works as-was with a NULL parameter is because of an
apparent coincidence: specialWARN() is called first thing in this
function and thinks a NULL is a defined marker for a particular meaning,
so the function immediately returns.  This commit makes that explicit
rather than relying on the apparent coincidence.
embed.fnc
op.c
proto.h