diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-10-29 16:25:38 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-10-29 16:25:38 +0000 |
commit | cb2f1b7b22aef64f26e7bd5484244a0df0c94631 (patch) | |
tree | 03d68d985746fd34cd8beaffce05f47c0d0ecdc7 /mathoms.c | |
parent | 0feed65a3b89b009c18025da638bc5d9cd03851d (diff) | |
download | perl-cb2f1b7b22aef64f26e7bd5484244a0df0c94631.tar.gz |
sv_2pv_nolen, sv_2pvbyte_nolen and sv_2pvutf8_nolen can all be replaced
with terse macros, and the function bodies retired.
p4raw-id: //depot/perl@25883
Diffstat (limited to 'mathoms.c')
-rw-r--r-- | mathoms.c | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -97,6 +97,54 @@ Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp) } /* +=for apidoc sv_2pv_nolen + +Like C<sv_2pv()>, but doesn't return the length too. You should usually +use the macro wrapper C<SvPV_nolen(sv)> instead. +=cut +*/ + +char * +Perl_sv_2pv_nolen(pTHX_ register SV *sv) +{ + return sv_2pv(sv, 0); +} + +/* +=for apidoc sv_2pvbyte_nolen + +Return a pointer to the byte-encoded representation of the SV. +May cause the SV to be downgraded from UTF-8 as a side-effect. + +Usually accessed via the C<SvPVbyte_nolen> macro. + +=cut +*/ + +char * +Perl_sv_2pvbyte_nolen(pTHX_ register SV *sv) +{ + return sv_2pvbyte(sv, 0); +} + +/* +=for apidoc sv_2pvutf8_nolen + +Return a pointer to the UTF-8-encoded representation of the SV. +May cause the SV to be upgraded to UTF-8 as a side-effect. + +Usually accessed via the C<SvPVutf8_nolen> macro. + +=cut +*/ + +char * +Perl_sv_2pvutf8_nolen(pTHX_ register SV *sv) +{ + return sv_2pvutf8(sv, 0); +} + +/* =for apidoc sv_force_normal Undo various types of fakery on an SV: if the PV is a shared string, make |