summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorSteven Schubiger <schubiger@cpan.org>2008-03-02 18:47:43 +0100
committerSteve Peters <steve@fisharerojo.org>2008-03-02 18:01:44 +0000
commitaf828c019524ef5fdaaaa6e3b76d5e2381d0ae6b (patch)
tree9b19b7bff1903d2fdc5ca2a2e40db0edf1a66a4c /sv.c
parent48dbb59ed9af112b035bdcc063c1471a22ec25a2 (diff)
downloadperl-af828c019524ef5fdaaaa6e3b76d5e2381d0ae6b.tar.gz
Re: [PATCH] sv.c: consting
Message-ID: <20080302164743.GB10705@refcnt.homeunix.org> p4raw-id: //depot/perl@33409
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sv.c b/sv.c
index cc220164e6..c621b2ab70 100644
--- a/sv.c
+++ b/sv.c
@@ -5240,7 +5240,7 @@ time you'll want to use C<sv_setsv> or one of its many macro front-ends.
*/
void
-Perl_sv_replace(pTHX_ register SV *sv, register SV *nsv)
+Perl_sv_replace(pTHX_ register SV *const sv, register SV *const nsv)
{
dVAR;
const U32 refcnt = SvREFCNT(sv);
@@ -5322,7 +5322,7 @@ instead.
*/
void
-Perl_sv_clear(pTHX_ register SV *sv)
+Perl_sv_clear(pTHX_ register SV *const sv)
{
dVAR;
const U32 type = SvTYPE(sv);
@@ -5546,7 +5546,7 @@ instead.
*/
SV *
-Perl_sv_newref(pTHX_ SV *sv)
+Perl_sv_newref(pTHX_ SV *const sv)
{
PERL_UNUSED_CONTEXT;
if (sv)
@@ -5566,7 +5566,7 @@ Normally called via a wrapper macro C<SvREFCNT_dec>.
*/
void
-Perl_sv_free(pTHX_ SV *sv)
+Perl_sv_free(pTHX_ SV *const sv)
{
dVAR;
if (!sv)
@@ -5614,7 +5614,7 @@ Perl_sv_free(pTHX_ SV *sv)
}
void
-Perl_sv_free2(pTHX_ SV *sv)
+Perl_sv_free2(pTHX_ SV *const sv)
{
dVAR;
@@ -5649,7 +5649,7 @@ coercion. See also C<SvCUR>, which gives raw access to the xpv_cur slot.
*/
STRLEN
-Perl_sv_len(pTHX_ register SV *sv)
+Perl_sv_len(pTHX_ register SV *const sv)
{
STRLEN len;
@@ -5682,7 +5682,7 @@ UTF-8 bytes as a single character. Handles magic and type coercion.
*/
STRLEN
-Perl_sv_len_utf8(pTHX_ register SV *sv)
+Perl_sv_len_utf8(pTHX_ register SV *const sv)
{
if (!sv)
return 0;
@@ -5756,7 +5756,7 @@ S_sv_pos_u2b_forwards(const U8 *const start, const U8 *const send,
the passed in UTF-8 offset. */
static STRLEN
S_sv_pos_u2b_midway(const U8 *const start, const U8 *send,
- STRLEN uoffset, STRLEN uend)
+ const STRLEN uoffset, const STRLEN uend)
{
STRLEN backw = uend - uoffset;
@@ -5786,8 +5786,8 @@ S_sv_pos_u2b_midway(const U8 *const start, const U8 *send,
will be used to reduce the amount of linear searching. The cache will be
created if necessary, and the found value offered to it for update. */
static STRLEN
-S_sv_pos_u2b_cached(pTHX_ SV *sv, MAGIC **mgp, const U8 *const start,
- const U8 *const send, STRLEN uoffset,
+S_sv_pos_u2b_cached(pTHX_ SV *const sv, MAGIC **const mgp, const U8 *const start,
+ const U8 *const send, const STRLEN uoffset,
STRLEN uoffset0, STRLEN boffset0)
{
STRLEN boffset = 0; /* Actually always set, but let's keep gcc happy. */
@@ -5907,7 +5907,7 @@ type coercion.
*/
void
-Perl_sv_pos_u2b(pTHX_ register SV *sv, I32* offsetp, I32* lenp)
+Perl_sv_pos_u2b(pTHX_ register SV *const sv, I32 *const offsetp, I32 *const lenp)
{
const U8 *start;
STRLEN len;