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 /sv.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 'sv.c')
-rw-r--r-- | sv.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -12185,13 +12185,11 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_psig_pend = (int*)NULL; } - if (proto_perl->Ipsig_ptr) { - Newx(PL_psig_ptr, SIG_SIZE, SV*); - Newx(PL_psig_name, SIG_SIZE, SV*); - sv_dup_inc_multiple(proto_perl->Ipsig_ptr, PL_psig_ptr, SIG_SIZE, - param); - sv_dup_inc_multiple(proto_perl->Ipsig_name, PL_psig_name, SIG_SIZE, + if (proto_perl->Ipsig_name) { + Newx(PL_psig_name, 2 * SIG_SIZE, SV*); + sv_dup_inc_multiple(proto_perl->Ipsig_name, PL_psig_name, 2 * SIG_SIZE, param); + PL_psig_ptr = PL_psig_name + SIG_SIZE; } else { PL_psig_ptr = (SV**)NULL; |