diff options
author | David Mitchell <davem@iabyn.com> | 2010-08-01 13:20:15 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-08-01 21:47:30 +0100 |
commit | cd6765485c511c7626564977066567e876af6644 (patch) | |
tree | 18f90ff7bc08ef8606de234de93a17a13567cac7 /sv.c | |
parent | e71b8a62048b820e9c251e89453b297934a0f89c (diff) | |
download | perl-cd6765485c511c7626564977066567e876af6644.tar.gz |
DEBUG_LEAKING_SCALARS: add sv_debug_parent
Rather than just recording whether an SV was cloned (sv->sv_debug_cloned),
record the address of the SV we were cloned from.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -294,7 +294,7 @@ S_new_SV(pTHX_ const char *file, int line, const char *func) : 0 ); sv->sv_debug_inpad = 0; - sv->sv_debug_cloned = 0; + sv->sv_debug_parent = NULL; sv->sv_debug_file = PL_curcop ? savepv(CopFILE(PL_curcop)): NULL; sv->sv_debug_serial = PL_sv_serial++; @@ -11168,7 +11168,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) dstr->sv_debug_optype = sstr->sv_debug_optype; dstr->sv_debug_line = sstr->sv_debug_line; dstr->sv_debug_inpad = sstr->sv_debug_inpad; - dstr->sv_debug_cloned = 1; + dstr->sv_debug_parent = (SV*)sstr; dstr->sv_debug_file = savepv(sstr->sv_debug_file); #endif |