From 4ab5bd5f1ac4d396ccef2207abef0c1e6fe14b66 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 4 Jun 2011 19:14:33 -0700 Subject: Make Devel::Peek::fill_mstats work on COWs --- ext/Devel-Peek/Peek.xs | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/Devel-Peek/Peek.xs') 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); -- cgit v1.2.1