projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
683f70b
)
sv_clear: destructor may change SV type
author
David Mitchell
<davem@iabyn.com>
Thu, 19 May 2011 15:21:07 +0000
(16:21 +0100)
committer
David Mitchell
<davem@iabyn.com>
Thu, 19 May 2011 21:01:02 +0000
(22:01 +0100)
so re-initialise the 'type' var afterwards
sv.c
patch
|
blob
|
history
diff --git
a/sv.c
b/sv.c
index
b55d49d
..
1833405
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-6054,6
+6054,7
@@
Perl_sv_clear(pTHX_ SV *const orig_sv)
if (type >= SVt_PVMG) {
if (SvOBJECT(sv)) {
if (!curse(sv, 1)) goto get_next_sv;
+ type = SvTYPE(sv); /* destructor may have changed it */
}
/* Free back-references before magic, in case the magic calls
* Perl code that has weak references to sv. */