summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-05-21 09:02:38 +0200
committerNicholas Clark <nick@ccl4.org>2009-05-21 09:02:38 +0200
commitd525a7b2081fbd38d70ffb150fc7fe6d30d0b62d (patch)
tree1e58d21e30ab60df1cdec9aa5c9b09799ccc92a3 /sv.c
parent708854f2ff3eebc1ddfd657353b5092eae729cb8 (diff)
downloadperl-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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sv.c b/sv.c
index b4084858b8..1dad3cf4c6 100644
--- a/sv.c
+++ b/sv.c
@@ -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;