summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-04-28 11:22:15 +0000
committerNicholas Clark <nick@ccl4.org>2005-04-28 11:22:15 +0000
commit8bd4d4c5ee440ccae167e2a7f5bf6f74ff02916b (patch)
treea0c18027ed2df90e52cd3274c69bcff795b71d6f /perl.c
parent9dcb96024af7087d05f03617e991e04fef9ff716 (diff)
downloadperl-8bd4d4c5ee440ccae167e2a7f5bf6f74ff02916b.tar.gz
Add a new macro SvPV_free() which undoes OOK and free()s the PVX(),
becase there's a lot of code around that calls SvOOK_off(), memmov()s the buffer, then promptly free()s it. So avoid the needless memmov(). p4raw-id: //depot/perl@24348
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index dfd5f83355..96f5b2dba2 100644
--- a/perl.c
+++ b/perl.c
@@ -957,8 +957,7 @@ perl_destruct(pTHXx)
}
}
/* we know that type >= SVt_PV */
- SvOOK_off(PL_mess_sv);
- Safefree(SvPVX(PL_mess_sv));
+ SvPV_free(PL_mess_sv);
Safefree(SvANY(PL_mess_sv));
Safefree(PL_mess_sv);
PL_mess_sv = Nullsv;