From d54acd4fd97ffeaf78858fa36c6d5d91be50c35e Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 8 Oct 2020 14:14:46 -0600 Subject: [PATCH] perlapi: Document SvPV_free --- sv.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sv.h b/sv.h index 4b6fe93..b946568 100644 --- a/sv.h +++ b/sv.h @@ -824,8 +824,8 @@ Remember to free the previous PV buffer. There are many things to check. Beware that the existing pointer may be involved in copy-on-write or other mischief, so do C and use C or C (or check the C flag) first to make sure this -modification is safe. Then finally, if it is not a COW, call C to -free the previous PV buffer. +modification is safe. Then finally, if it is not a COW, call +C> to free the previous PV buffer. =for apidoc Am|void|SvUV_set|SV* sv|UV val Set the value of the UV pointer in C to val. See C>. @@ -1380,6 +1380,14 @@ object type. Exposed to perl code via Internals::SvREADONLY(). SvPV_renew(sv, _lEnGtH); \ } STMT_END +/* +=for apidoc Am|void|SvPV_free|SV * sv + +Frees the PV buffer in C, leaving things in a precarious state, so should +only be used as part of a larger operation + +=cut +*/ #define SvPV_free(sv) \ STMT_START { \ assert(SvTYPE(sv) >= SVt_PV); \ -- 1.8.3.1