summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-02-24 17:15:41 +0000
committerNicholas Clark <nick@ccl4.org>2010-05-24 15:50:57 +0100
commitd08d57ef17162c52e2024a3ba6755f778acbc697 (patch)
tree0faa95f64ed1d63936c793a6a68eab0efd701c0f /embed.fnc
parent1db366cc74404c47243e1d86efa59c6559db818e (diff)
downloadperl-d08d57ef17162c52e2024a3ba6755f778acbc697.tar.gz
Better ithreads cloning - add all SVs with a 0 refcnt to the temps stack.
Track all SVs created by sv_dup() that have a 0 reference count. If they still have a 0 reference count at the end of cloning, assign a reference to each to the temps stack. As the temps stack is cleared at thread exit, SVs book keeping will be correct and consistent before perl_destruct() makes its check for leaked scalars. Remove special case code for checking each @_ and the parent's temp stack.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc4
1 files changed, 4 insertions, 0 deletions
diff --git a/embed.fnc b/embed.fnc
index b35ad7e51b..882ea8b9e1 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1421,6 +1421,10 @@ ApR |MAGIC* |mg_dup |NULLOK MAGIC *mg|NN CLONE_PARAMS *const param
s |SV ** |sv_dup_inc_multiple|NN SV *const *source|NN SV **dest \
|SSize_t items|NN CLONE_PARAMS *const param
#endif
+#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
+sR |SV* |sv_dup_common |NN const SV *const sstr \
+ |NN CLONE_PARAMS *const param
+#endif
ApR |SV* |sv_dup |NULLOK const SV *const sstr|NN CLONE_PARAMS *const param
ApR |SV* |sv_dup_inc |NULLOK const SV *const sstr \
|NN CLONE_PARAMS *const param