diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-06 22:17:04 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-06 22:17:04 +0000 |
commit | 9cfa90c07dda2bbf7df20096eab1b9057035d586 (patch) | |
tree | ba81ae3962d4ec6640cea3d94d57d65b9ee3691f /perlio.c | |
parent | c3929b7290197fd6055681e2dabb11ad55efccae (diff) | |
download | perl-9cfa90c07dda2bbf7df20096eab1b9057035d586.tar.gz |
Get the correct refcount on the temporary assignment to PL_sigwarn so
that other code assigning to $SIG{__WARN__} doesn't cause a premature
free.
p4raw-id: //depot/perl@24410
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -762,7 +762,8 @@ PerlIO_find_layer(pTHX_ const char *name, STRLEN len, int load) ENTER; SAVEINT(PL_in_load_module); if (cv) { - SAVESPTR(PL_warnhook); + SAVEGENERICSV(PL_warnhook); + SvREFCNT_inc(cv); PL_warnhook = (SV *) cv; } PL_in_load_module++; @@ -5039,3 +5040,13 @@ PerlIO_sprintf(char *s, int n, const char *fmt, ...) return result; } #endif + +/* + * Local variables: + * c-indentation-style: bsd + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + * + * vim: shiftwidth=4: +*/ |