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)
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);
(IV) CopLINE(PL_curcop));
Perl_sv_vcatpvf(aTHX_ sv, fmt, &ap);
- s = SvPV(sv, len);
+ s = SvPV_const(sv, len);
PerlLIO_write(PL_perlio_debug_fd, s, len);
SvREFCNT_dec(sv);
#endif
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));
*/
dXSARGS;
if (items)
- PerlIO_debug("warning:%s\n",SvPV_nolen(ST(0)));
+ PerlIO_debug("warning:%s\n",SvPV_nolen_const(ST(0)));
XSRETURN(0);
}
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) =
SV *layers = PL_curcop->cop_io;
if (layers) {
STRLEN len;
- type = SvPV(layers, len);
+ type = SvPV_const(layers, len);
if (type && mode[0] != 'r') {
/*
* Skip to write part
perm = 0666;
}
if (imode != -1) {
- const char *path = SvPV_nolen(*args);
+ const char *path = SvPV_nolen_const(*args);
fd = PerlLIO_open3(path, imode, perm);
}
}
{
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));
}
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);
{
dTHX;
SV *sv = newSVpvn("", 0);
- char *s;
+ const char *s;
STRLEN len;
SSize_t wrote;
#ifdef NEED_VA_COPY
#else
sv_vcatpvf(sv, fmt, &ap);
#endif
- s = SvPV(sv, len);
+ s = SvPV_const(sv, len);
wrote = PerlIO_write(f, s, len);
SvREFCNT_dec(sv);
return wrote;