diff options
author | Zefram <zefram@fysh.org> | 2010-09-11 19:36:10 +0100 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-09-28 21:35:02 +0200 |
commit | 9dcc53ea14d7a502bb5ac0877765bde14f8cc721 (patch) | |
tree | e04fbefccc4e81298835b1e4fb69e8db347ff810 /util.c | |
parent | dccfc75d21f1ac6a97926d5bac2e89d3cd22eafa (diff) | |
download | perl-9dcc53ea14d7a502bb5ac0877765bde14f8cc721.tar.gz |
systematically provide pv/pvn/pvs/sv quartets
Anywhere an API function takes a string in pvn form, ensure that there
are corresponding pv, pvs, and sv APIs.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -1087,6 +1087,25 @@ Perl_savesvpv(pTHX_ SV *sv) return (char *) CopyD(pv,newaddr,len,char); } +/* +=for apidoc savesharedsvpv + +A version of C<savesharedpv()> which allocates the duplicate string in +memory which is shared between threads. + +=cut +*/ + +char * +Perl_savesharedsvpv(pTHX_ SV *sv) +{ + STRLEN len; + const char * const pv = SvPV_const(sv, len); + + PERL_ARGS_ASSERT_SAVESHAREDSVPV; + + return savesharedpvn(pv, len); +} /* the SV for Perl_form() and mess() is not kept in an arena */ |