This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Opcode: fix 'null argument' warning
authorDavid Mitchell <davem@iabyn.com>
Wed, 13 Nov 2013 17:30:10 +0000 (17:30 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Nov 2013 17:38:43 +0000 (17:38 +0000)
commite983bd7a40f013079d8e168def01cf823055a62a
tree6e7b967664e6d207678559b12398f85ddd937633
parent13142853235f9d75c2f0986e90edc8f913526b00
Opcode: fix 'null argument' warning

HvNAME_get() can return NULL, and strNE() wants non-null args.

[
As a side note: on debugging builds this line

    if (strNE(HvNAME_get(hv),"main")) {

macro-expands into an 18,000 character line (!) due to the fact that
HvNAME_get() is quite a big expansion under debugging, and strNE expands to
strlen, which under gcc expands to a huge macro (which is mainly lots of
different compile-time alternatives depending on which of its args are
constants), that references its args several times.
]
ext/Opcode/Opcode.pm
ext/Opcode/Opcode.xs