summaryrefslogtreecommitdiff
path: root/ext/Devel-Peek/Peek.xs
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-06-04 19:14:33 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-06-04 19:29:04 -0700
commit4ab5bd5f1ac4d396ccef2207abef0c1e6fe14b66 (patch)
tree611d1041c686edb69557bfdfd73d7c1ca43fd077 /ext/Devel-Peek/Peek.xs
parent47d6f3d6640ee5a8c3c6670383171a78d34abbaa (diff)
downloadperl-4ab5bd5f1ac4d396ccef2207abef0c1e6fe14b66.tar.gz
Make Devel::Peek::fill_mstats work on COWs
Diffstat (limited to 'ext/Devel-Peek/Peek.xs')
-rw-r--r--ext/Devel-Peek/Peek.xs1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/Devel-Peek/Peek.xs b/ext/Devel-Peek/Peek.xs
index 3dcba4780e..5e8deb9830 100644
--- a/ext/Devel-Peek/Peek.xs
+++ b/ext/Devel-Peek/Peek.xs
@@ -161,6 +161,7 @@ fill_mstats(SV *sv, int level)
{
dTHX;
+ if (SvIsCOW(sv)) sv_force_normal(sv);
if (SvREADONLY(sv))
croak("Cannot modify a readonly value");
SvGROW(sv, sizeof(struct mstats_buffer)+1);