diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-05-04 22:58:02 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-05-04 22:58:02 +0100 |
commit | 46d6503777f357c38f9d1cde19b6d3d1c6f36d3d (patch) | |
tree | e9c9a37574442a9135e2345bff8efaa0ab49cbc8 /sv.c | |
parent | 566771cc1208eb7c5c8363435c4bd1299f0ae5e5 (diff) | |
download | perl-46d6503777f357c38f9d1cde19b6d3d1c6f36d3d.tar.gz |
In Perl_gp_dup(), no need to explicitly zero ret->gp_refcnt after the Newxz().
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -10495,7 +10495,8 @@ Perl_gp_dup(pTHX_ GP *const gp, CLONE_PARAMS *const param) ptr_table_store(PL_ptr_table, gp, ret); /* clone */ - ret->gp_refcnt = 0; /* must be before any other dups! */ + /* ret->gp_refcnt must be 0 before any other dups are called. We're relying + on Newxz() to do this for us. */ ret->gp_sv = sv_dup_inc(gp->gp_sv, param); ret->gp_io = io_dup_inc(gp->gp_io, param); ret->gp_form = cv_dup_inc(gp->gp_form, param); |