Skip to content

Commit

Permalink
Merge b883c14 into facfab6
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed May 15, 2021
2 parents facfab6 + b883c14 commit 0381d10
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sv.h
Expand Up @@ -1402,6 +1402,15 @@ why not just use C<SvGROW> if you're not sure about the provenance?
(char*)saferealloc((Malloc_t)SvPVX(sv), \
(MEM_SIZE)((n))))); \
} STMT_END
/*
=for apidoc Am|void|SvPV_shrink_to_cur|SV* sv
Trim any trailing unused memory in the PV of C<sv>, which needs to have a real
C<PV> that is unencumbered by things like COW. Using
C<SV_CHECK_THINKFIRST> or C<SV_CHECK_THINKFIRST_COW_DROP> before
calling this should clean it up.
=cut
*/

#define SvPV_shrink_to_cur(sv) STMT_START { \
const STRLEN _lEnGtH = SvCUR(sv) + 1; \
Expand Down

0 comments on commit 0381d10

Please sign in to comment.