From: Nicholas Clark Date: Sat, 29 Oct 2005 17:21:24 +0000 (+0000) Subject: Replace sv_catsv_mg and sv_catpvn_mg, and move the obsolete bodies to X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b347df820803cfaa55e1ef645ee3797402b58e10;p=p5sagit%2Fp5-mst-13.2.git Replace sv_catsv_mg and sv_catpvn_mg, and move the obsolete bodies to mathoms.c p4raw-id: //depot/perl@25885 --- diff --git a/embed.fnc b/embed.fnc index da2704a..d85bacd 100644 --- a/embed.fnc +++ b/embed.fnc @@ -902,8 +902,8 @@ Ap |int |runops_debug Afpd |void |sv_catpvf_mg |NN SV *sv|NN const char* pat|... Apd |void |sv_vcatpvf_mg |NN SV* sv|NN const char* pat|NULLOK va_list* args Apd |void |sv_catpv_mg |NN SV *sv|NN const char *ptr -Apd |void |sv_catpvn_mg |NN SV *sv|NN const char *ptr|STRLEN len -Apd |void |sv_catsv_mg |NN SV *dstr|NULLOK SV *sstr +Apdbm |void |sv_catpvn_mg |NN SV *sv|NN const char *ptr|STRLEN len +Apdbm |void |sv_catsv_mg |NN SV *dstr|NULLOK SV *sstr Afpd |void |sv_setpvf_mg |NN SV *sv|NN const char* pat|... Apd |void |sv_vsetpvf_mg |NN SV* sv|NN const char* pat|NULLOK va_list* args Apd |void |sv_setiv_mg |NN SV *sv|IV i diff --git a/embed.h b/embed.h index e41c68a..ac5c490 100644 --- a/embed.h +++ b/embed.h @@ -942,8 +942,6 @@ #define sv_catpvf_mg Perl_sv_catpvf_mg #define sv_vcatpvf_mg Perl_sv_vcatpvf_mg #define sv_catpv_mg Perl_sv_catpv_mg -#define sv_catpvn_mg Perl_sv_catpvn_mg -#define sv_catsv_mg Perl_sv_catsv_mg #define sv_setpvf_mg Perl_sv_setpvf_mg #define sv_vsetpvf_mg Perl_sv_vsetpvf_mg #define sv_setiv_mg Perl_sv_setiv_mg @@ -2927,8 +2925,6 @@ #define runops_debug() Perl_runops_debug(aTHX) #define sv_vcatpvf_mg(a,b,c) Perl_sv_vcatpvf_mg(aTHX_ a,b,c) #define sv_catpv_mg(a,b) Perl_sv_catpv_mg(aTHX_ a,b) -#define sv_catpvn_mg(a,b,c) Perl_sv_catpvn_mg(aTHX_ a,b,c) -#define sv_catsv_mg(a,b) Perl_sv_catsv_mg(aTHX_ a,b) #define sv_vsetpvf_mg(a,b,c) Perl_sv_vsetpvf_mg(aTHX_ a,b,c) #define sv_setiv_mg(a,b) Perl_sv_setiv_mg(aTHX_ a,b) #define sv_setpviv_mg(a,b) Perl_sv_setpviv_mg(aTHX_ a,b) diff --git a/mathoms.c b/mathoms.c index 2eee3cb..f9eda30 100644 --- a/mathoms.c +++ b/mathoms.c @@ -180,6 +180,20 @@ Perl_sv_catpvn(pTHX_ SV *dsv, const char* sstr, STRLEN slen) sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC); } +/* +=for apidoc sv_catpvn_mg + +Like C, but also handles 'set' magic. + +=cut +*/ + +void +Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len) +{ + sv_catpvn_flags(sv,ptr,len,SV_GMAGIC|SV_SMAGIC); +} + /* sv_catsv() is now a macro using Perl_sv_catsv_flags(); * this function provided for binary compatibility only */ @@ -191,6 +205,20 @@ Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr) } /* +=for apidoc sv_catsv_mg + +Like C, but also handles 'set' magic. + +=cut +*/ + +void +Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv) +{ + sv_catsv_flags(dsv,ssv,SV_GMAGIC|SV_SMAGIC); +} + +/* =for apidoc sv_iv A private implementation of the C macro for compilers which can't diff --git a/proto.h b/proto.h index a932e61..64db0d8 100644 --- a/proto.h +++ b/proto.h @@ -2507,12 +2507,12 @@ PERL_CALLCONV void Perl_sv_catpv_mg(pTHX_ SV *sv, const char *ptr) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); -PERL_CALLCONV void Perl_sv_catpvn_mg(pTHX_ SV *sv, const char *ptr, STRLEN len) +/* PERL_CALLCONV void Perl_sv_catpvn_mg(pTHX_ SV *sv, const char *ptr, STRLEN len) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); + __attribute__nonnull__(pTHX_2); */ -PERL_CALLCONV void Perl_sv_catsv_mg(pTHX_ SV *dstr, SV *sstr) - __attribute__nonnull__(pTHX_1); +/* PERL_CALLCONV void Perl_sv_catsv_mg(pTHX_ SV *dstr, SV *sstr) + __attribute__nonnull__(pTHX_1); */ PERL_CALLCONV void Perl_sv_setpvf_mg(pTHX_ SV *sv, const char* pat, ...) __attribute__format__(__printf__,pTHX_2,pTHX_3) diff --git a/sv.c b/sv.c index 2a0dff6..94f4b32 100644 --- a/sv.c +++ b/sv.c @@ -4593,20 +4593,6 @@ Perl_sv_catpvn_flags(pTHX_ register SV *dsv, register const char *sstr, register } /* -=for apidoc sv_catpvn_mg - -Like C, but also handles 'set' magic. - -=cut -*/ - -void -Perl_sv_catpvn_mg(pTHX_ register SV *sv, register const char *ptr, register STRLEN len) -{ - sv_catpvn_flags(sv,ptr,len,SV_GMAGIC|SV_SMAGIC); -} - -/* =for apidoc sv_catsv Concatenates the string from SV C onto the end of the string in @@ -4662,20 +4648,6 @@ Perl_sv_catsv_flags(pTHX_ SV *dsv, register SV *ssv, I32 flags) } /* -=for apidoc sv_catsv_mg - -Like C, but also handles 'set' magic. - -=cut -*/ - -void -Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv) -{ - sv_catsv_flags(dsv,ssv,SV_GMAGIC|SV_SMAGIC); -} - -/* =for apidoc sv_catpv Concatenates the string onto the end of the string which is in the SV. diff --git a/sv.h b/sv.h index 06ab68a..fc8729f 100644 --- a/sv.h +++ b/sv.h @@ -1392,7 +1392,10 @@ Like C but doesn't process magic. #define sv_setsv_nomg(dsv, ssv) sv_setsv_flags(dsv, ssv, 0) #define sv_catsv(dsv, ssv) sv_catsv_flags(dsv, ssv, SV_GMAGIC) #define sv_catsv_nomg(dsv, ssv) sv_catsv_flags(dsv, ssv, 0) +#define sv_catsv_mg(dsv, ssv) sv_catsv_flags(dsv, ssv, SV_GMAGIC|SV_SMAGIC) #define sv_catpvn(dsv, sstr, slen) sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC) +#define sv_catpvn_mg(sv, sstr, slen) \ + sv_catpvn_flags(sv, sstr, slen, SV_GMAGIC|SV_SMAGIC); #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)