summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-07 18:38:39 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-07 18:38:39 +0000
commite62f0680cdecd36f79df8a7dabc61c6a2739f07a (patch)
tree28d33b79419a95800569ff331a2eec4bf0e66524 /perlio.c
parent9ce348e89750366600d8292ab1f0f55948ddb66e (diff)
downloadperl-e62f0680cdecd36f79df8a7dabc61c6a2739f07a.tar.gz
More SvPV consting.
p4raw-id: //depot/perl@24740
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/perlio.c b/perlio.c
index 05963d0ff0..55148e8f38 100644
--- a/perlio.c
+++ b/perlio.c
@@ -308,7 +308,7 @@ PerlIO_openn(pTHX_ const char *layers, const char *mode, int fd,
if (*args == &PL_sv_undef)
return PerlIO_tmpfile();
else {
- const char *name = SvPV_nolen(*args);
+ const char *name = SvPV_nolen_const(*args);
if (*mode == IoTYPE_NUMERIC) {
fd = PerlLIO_open3(name, imode, perm);
if (fd >= 0)
@@ -334,7 +334,7 @@ XS(XS_PerlIO__Layer__find)
if (items < 2)
Perl_croak(aTHX_ "Usage class->find(name[,load])");
else {
- const char *name = SvPV_nolen(ST(1));
+ const char *name = SvPV_nolen_const(ST(1));
ST(0) = (strEQ(name, "crlf")
|| strEQ(name, "raw")) ? &PL_sv_yes : &PL_sv_undef;
XSRETURN(1);
@@ -844,7 +844,7 @@ XS(XS_io_MODIFY_SCALAR_ATTRIBUTES)
Perl_warn(aTHX_ "attrib %" SVf, sv);
for (i = 2; i < items; i++) {
STRLEN len;
- const char *name = SvPV(ST(i), len);
+ const char *name = SvPV_const(ST(i), len);
SV *layer = PerlIO_find_layer(aTHX_ name, len, 1);
if (layer) {
av_push(av, SvREFCNT_inc(layer));
@@ -875,7 +875,7 @@ XS(XS_PerlIO__Layer__NoWarnings)
*/
dXSARGS;
if (items)
- PerlIO_debug("warning:%s\n",SvPV_nolen(ST(0)));
+ PerlIO_debug("warning:%s\n",SvPV_nolen_const(ST(0)));
XSRETURN(0);
}
@@ -886,7 +886,7 @@ XS(XS_PerlIO__Layer__find)
Perl_croak(aTHX_ "Usage class->find(name[,load])");
else {
STRLEN len;
- const char *name = SvPV(ST(1), len);
+ const char *name = SvPV_const(ST(1), len);
const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
PerlIO_funcs *layer = PerlIO_find_layer(aTHX_ name, len, load);
ST(0) =
@@ -2443,7 +2443,7 @@ PerlIOUnix_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers,
perm = 0666;
}
if (imode != -1) {
- const char *path = SvPV_nolen(*args);
+ const char *path = SvPV_nolen_const(*args);
fd = PerlLIO_open3(path, imode, perm);
}
}
@@ -2732,7 +2732,7 @@ PerlIOStdio_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers,
{
char tmode[8];
if (PerlIOValid(f)) {
- const char *path = SvPV_nolen(*args);
+ const char *path = SvPV_nolen_const(*args);
PerlIOStdio *s = PerlIOSelf(f, PerlIOStdio);
FILE *stdio;
PerlIOUnix_refcnt_dec(fileno(s->stdio));
@@ -2746,7 +2746,7 @@ PerlIOStdio_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers,
}
else {
if (narg > 0) {
- const char *path = SvPV_nolen(*args);
+ const char *path = SvPV_nolen_const(*args);
if (*mode == IoTYPE_NUMERIC) {
mode++;
fd = PerlLIO_open3(path, imode, perm);