diff options
author | Steven Schubiger <schubiger@cpan.org> | 2008-03-01 20:29:53 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-03-02 07:03:36 +0000 |
commit | 2b021c53857fc8f84c88814fb57222878208d85f (patch) | |
tree | 07e0004106b9fc520ca9d71563fcd64001970a46 /sv.c | |
parent | 596fddd5e3e62452096460708abaa5a8cbf23298 (diff) | |
download | perl-2b021c53857fc8f84c88814fb57222878208d85f.tar.gz |
Re: [PATCH] sv.c: consting
Message-ID: <20080301182953.GB16742@refcnt.homeunix.org>
p4raw-id: //depot/perl@33406
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -4540,7 +4540,7 @@ valid UTF-8. Handles 'get' magic, but not 'set' magic. See C<sv_catpv_mg>. =cut */ void -Perl_sv_catpv(pTHX_ register SV *sv, register const char *ptr) +Perl_sv_catpv(pTHX_ register SV *const sv, register const char *ptr) { dVAR; register STRLEN len; @@ -4571,7 +4571,7 @@ Like C<sv_catpv>, but also handles 'set' magic. */ void -Perl_sv_catpv_mg(pTHX_ register SV *sv, register const char *ptr) +Perl_sv_catpv_mg(pTHX_ register SV *const sv, register const char *const ptr) { PERL_ARGS_ASSERT_SV_CATPV_MG; @@ -4597,7 +4597,7 @@ modules supporting older perls. */ SV * -Perl_newSV(pTHX_ STRLEN len) +Perl_newSV(pTHX_ const STRLEN len) { dVAR; register SV *sv; @@ -4629,8 +4629,8 @@ to contain an C<SV*> and is stored as-is with its REFCNT incremented. =cut */ MAGIC * -Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtable, - const char* name, I32 namlen) +Perl_sv_magicext(pTHX_ SV *const sv, SV *const obj, const int how, + const MGVTBL *const vtable, const char *const name, const I32 namlen) { dVAR; MAGIC* mg; @@ -4714,7 +4714,8 @@ to add more than one instance of the same 'how'. */ void -Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 namlen) +Perl_sv_magic(pTHX_ register SV *const sv, SV *const obj, const int how, + const char *const name, const I32 namlen) { dVAR; const MGVTBL *vtable; @@ -4901,7 +4902,7 @@ Removes all magic of type C<type> from an SV. */ int -Perl_sv_unmagic(pTHX_ SV *sv, int type) +Perl_sv_unmagic(pTHX_ SV *const sv, const int type) { MAGIC* mg; MAGIC** mgp; @@ -4954,7 +4955,7 @@ called after the RV is cleared. */ SV * -Perl_sv_rvweaken(pTHX_ SV *sv) +Perl_sv_rvweaken(pTHX_ SV *const sv) { SV *tsv; @@ -4981,7 +4982,7 @@ Perl_sv_rvweaken(pTHX_ SV *sv) */ void -Perl_sv_add_backref(pTHX_ SV *tsv, SV *sv) +Perl_sv_add_backref(pTHX_ SV *const tsv, SV *const sv) { dVAR; AV *av; @@ -5037,7 +5038,7 @@ Perl_sv_add_backref(pTHX_ SV *tsv, SV *sv) */ STATIC void -S_sv_del_backref(pTHX_ SV *tsv, SV *sv) +S_sv_del_backref(pTHX_ SV *const tsv, SV *const sv) { dVAR; AV *av = NULL; @@ -5089,7 +5090,7 @@ S_sv_del_backref(pTHX_ SV *tsv, SV *sv) } int -Perl_sv_kill_backrefs(pTHX_ SV *sv, AV *av) +Perl_sv_kill_backrefs(pTHX_ SV *const sv, AV *const av) { SV **svp = AvARRAY(av); @@ -5141,7 +5142,8 @@ the Perl substr() function. */ void -Perl_sv_insert(pTHX_ SV *bigstr, STRLEN offset, STRLEN len, const char *little, STRLEN littlelen) +Perl_sv_insert(pTHX_ SV *const bigstr, const STRLEN offset, const STRLEN len, + const char *const little, const STRLEN littlelen) { dVAR; register char *big; |