diff options
-rw-r--r-- | embed.fnc | 6 | ||||
-rw-r--r-- | embed.h | 6 | ||||
-rw-r--r-- | mathoms.c | 48 | ||||
-rw-r--r-- | proto.h | 12 | ||||
-rw-r--r-- | sv.c | 48 | ||||
-rw-r--r-- | sv.h | 3 |
6 files changed, 60 insertions, 63 deletions
@@ -931,9 +931,9 @@ Ap |void |do_sv_dump |I32 level|NN PerlIO *file|NULLOK SV *sv|I32 nest \ |I32 maxnest|bool dumpops|STRLEN pvlim Ap |void |magic_dump |NULLOK const MAGIC *mg Ap |void |reginitcolors -ApdR |char* |sv_2pv_nolen |NN SV* sv -ApdR |char* |sv_2pvutf8_nolen|NN SV* sv -ApdR |char* |sv_2pvbyte_nolen|NN SV* sv +ApdRmb |char* |sv_2pv_nolen |NN SV* sv +ApdRmb |char* |sv_2pvutf8_nolen|NN SV* sv +ApdRmb |char* |sv_2pvbyte_nolen|NN SV* sv AmdbR |char* |sv_pv |NN SV *sv AmdbR |char* |sv_pvutf8 |NN SV *sv AmdbR |char* |sv_pvbyte |NN SV *sv @@ -967,9 +967,6 @@ #define do_sv_dump Perl_do_sv_dump #define magic_dump Perl_magic_dump #define reginitcolors Perl_reginitcolors -#define sv_2pv_nolen Perl_sv_2pv_nolen -#define sv_2pvutf8_nolen Perl_sv_2pvutf8_nolen -#define sv_2pvbyte_nolen Perl_sv_2pvbyte_nolen #define sv_utf8_downgrade Perl_sv_utf8_downgrade #define sv_utf8_encode Perl_sv_utf8_encode #define sv_utf8_decode Perl_sv_utf8_decode @@ -2953,9 +2950,6 @@ #define do_sv_dump(a,b,c,d,e,f,g) Perl_do_sv_dump(aTHX_ a,b,c,d,e,f,g) #define magic_dump(a) Perl_magic_dump(aTHX_ a) #define reginitcolors() Perl_reginitcolors(aTHX) -#define sv_2pv_nolen(a) Perl_sv_2pv_nolen(aTHX_ a) -#define sv_2pvutf8_nolen(a) Perl_sv_2pvutf8_nolen(aTHX_ a) -#define sv_2pvbyte_nolen(a) Perl_sv_2pvbyte_nolen(aTHX_ a) #define sv_utf8_downgrade(a,b) Perl_sv_utf8_downgrade(aTHX_ a,b) #define sv_utf8_encode(a) Perl_sv_utf8_encode(aTHX_ a) #define sv_utf8_decode(a) Perl_sv_utf8_decode(aTHX_ a) @@ -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 @@ -2594,17 +2594,17 @@ PERL_CALLCONV void Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 ne PERL_CALLCONV void Perl_magic_dump(pTHX_ const MAGIC *mg); PERL_CALLCONV void Perl_reginitcolors(pTHX); -PERL_CALLCONV char* Perl_sv_2pv_nolen(pTHX_ SV* sv) +/* PERL_CALLCONV char* Perl_sv_2pv_nolen(pTHX_ SV* sv) __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1); + __attribute__nonnull__(pTHX_1); */ -PERL_CALLCONV char* Perl_sv_2pvutf8_nolen(pTHX_ SV* sv) +/* PERL_CALLCONV char* Perl_sv_2pvutf8_nolen(pTHX_ SV* sv) __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1); + __attribute__nonnull__(pTHX_1); */ -PERL_CALLCONV char* Perl_sv_2pvbyte_nolen(pTHX_ SV* sv) +/* PERL_CALLCONV char* Perl_sv_2pvbyte_nolen(pTHX_ SV* sv) __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1); + __attribute__nonnull__(pTHX_1); */ /* PERL_CALLCONV char* sv_pv(pTHX_ SV *sv) __attribute__warn_unused_result__ @@ -2901,20 +2901,6 @@ S_asUV(pTHX_ SV *sv) return U_V(Atof(SvPVX_const(sv))); } -/* -=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); -} - /* uiv_2buf(): private routine for use by sv_2pv_flags(): print an IV or * UV as a string towards the end of buf, and return pointers to start and * end of it. @@ -3318,23 +3304,6 @@ Perl_sv_copypv(pTHX_ SV *dsv, register SV *ssv) } /* -=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_2pvbyte Return a pointer to the byte-encoded representation of the SV, and set *lp @@ -3354,23 +3323,6 @@ Perl_sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp) } /* -=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_2pvutf8 * * Return a pointer to the UTF-8-encoded representation of the SV, and set *lp @@ -1393,6 +1393,9 @@ Like C<sv_catsv> but doesn't process magic. #define sv_catsv_nomg(dsv, ssv) sv_catsv_flags(dsv, ssv, 0) #define sv_catpvn(dsv, sstr, slen) sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC) #define sv_2pv(sv, lp) sv_2pv_flags(sv, lp, SV_GMAGIC) +#define sv_2pv_nolen(sv) sv_2pv(sv, 0) +#define sv_2pvbyte_nolen(sv) sv_2pvbyte(sv, 0) +#define sv_2pvutf8_nolen(sv) sv_2pvutf8(sv, 0) #define sv_2pv_nomg(sv, lp) sv_2pv_flags(sv, lp, 0) #define sv_pvn_force(sv, lp) sv_pvn_force_flags(sv, lp, SV_GMAGIC) #define sv_utf8_upgrade(sv) sv_utf8_upgrade_flags(sv, SV_GMAGIC) |