diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-02-24 17:15:41 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-05-24 15:50:57 +0100 |
commit | d08d57ef17162c52e2024a3ba6755f778acbc697 (patch) | |
tree | 0faa95f64ed1d63936c793a6a68eab0efd701c0f /proto.h | |
parent | 1db366cc74404c47243e1d86efa59c6559db818e (diff) | |
download | perl-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 'proto.h')
-rw-r--r-- | proto.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -4289,6 +4289,15 @@ STATIC SV ** S_sv_dup_inc_multiple(pTHX_ SV *const *source, SV **dest, SSize_t i assert(source); assert(dest); assert(param) #endif +#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT) +STATIC SV* S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_DUP_COMMON \ + assert(sstr); assert(param) + +#endif PERL_CALLCONV SV* Perl_sv_dup(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); |