diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-05-21 09:02:38 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-05-21 09:02:38 +0200 |
commit | d525a7b2081fbd38d70ffb150fc7fe6d30d0b62d (patch) | |
tree | 1e58d21e30ab60df1cdec9aa5c9b09799ccc92a3 /gv.c | |
parent | 708854f2ff3eebc1ddfd657353b5092eae729cb8 (diff) | |
download | perl-d525a7b2081fbd38d70ffb150fc7fe6d30d0b62d.tar.gz |
Use only one block of memory for both PL_psig_name and PL_psig_ptr.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1232,10 +1232,10 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, if (strEQ(name2, "IG")) { HV *hv; I32 i; - if (!PL_psig_ptr) { - Newxz(PL_psig_ptr, SIG_SIZE, SV*); - Newxz(PL_psig_name, SIG_SIZE, SV*); + if (!PL_psig_name) { + Newxz(PL_psig_name, 2 * SIG_SIZE, SV*); Newxz(PL_psig_pend, SIG_SIZE, int); + PL_psig_ptr = PL_psig_name + SIG_SIZE; } else { /* I think that the only way to get here is to re-use an embedded perl interpreter, where the previous @@ -1246,8 +1246,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, interpreter structure that something else will crash before we get here. I suspect that this is one of those "doctor, it hurts when I do this" bugs. */ - Zero(PL_psig_ptr, SIG_SIZE, SV*); - Zero(PL_psig_name, SIG_SIZE, SV*); + Zero(PL_psig_name, 2 * SIG_SIZE, SV*); Zero(PL_psig_pend, SIG_SIZE, int); } GvMULTI_on(gv); |