Cache the signal number or -1 in mg_private, to reduce calls to Perl_whichsig().
authorNicholas Clark <nick@ccl4.org>
Thu, 21 May 2009 06:08:53 +0000 (08:08 +0200)
committerNicholas Clark <nick@ccl4.org>
Thu, 21 May 2009 06:12:33 +0000 (08:12 +0200)
commit708854f2ff3eebc1ddfd657353b5092eae729cb8
treebbf1652c9d4bd5f01fc9ee5aa4e9f19be1457f13
parent8ac77ac96d51ab94f305d02883edecb1e2a49e19
Cache the signal number or -1 in mg_private, to reduce calls to Perl_whichsig().
It doesn't matter that 0 isn't cacheable, as the logic in Perl_magic_setsig()
is such that we already can't "set" $SIG{ZERO}. Without this we make thousands
of failing calls to Perl_whichsig() from Perl_magic_getsig() for "__WARN__".
mg.c