summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2003-01-28 13:27:17 +0000
committerhv <hv@crypt.org>2003-02-12 02:20:39 +0000
commite3feee4e511b83331e79ac04619b8ea753bb64aa (patch)
tree1bba0ebfeb41bc6f32680b354edcb74524d8c473 /ext
parentf3583277f058a41c88989ac547f12b7065567d88 (diff)
downloadperl-e3feee4e511b83331e79ac04619b8ea753bb64aa.tar.gz
to silence compiler warning
Message-ID: <533D273D4014D411AB1D00062938C4D9040462CC@hotel.npl.co.uk> p4raw-id: //depot/perl@18697
Diffstat (limited to 'ext')
-rw-r--r--ext/PerlIO/scalar/scalar.xs2
-rw-r--r--ext/Storable/Storable.xs17
2 files changed, 10 insertions, 9 deletions
diff --git a/ext/PerlIO/scalar/scalar.xs b/ext/PerlIO/scalar/scalar.xs
index d92ef83aa2..b26a238558 100644
--- a/ext/PerlIO/scalar/scalar.xs
+++ b/ext/PerlIO/scalar/scalar.xs
@@ -216,7 +216,7 @@ PerlIOScalar_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers, IV n,
if (!f) {
f = PerlIO_allocate(aTHX);
}
- if (f = PerlIO_push(aTHX_ f, self, mode, arg)) {
+ if ( (f = PerlIO_push(aTHX_ f, self, mode, arg)) ) {
PerlIOBase(f)->flags |= PERLIO_F_OPEN;
}
return f;
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index f1831b8888..7cc610e733 100644
--- a/ext/Storable/Storable.xs
+++ b/ext/Storable/Storable.xs
@@ -2427,14 +2427,14 @@ static int store_code(stcxt_t *cxt, CV *cv)
text = POPs;
len = SvLEN(text);
- reallen = strlen(SvPV(text,PL_na));
+ reallen = strlen(SvPV_nolen(text));
/*
* Empty code references or XS functions are deparsed as
* "(prototype) ;" or ";".
*/
- if (len == 0 || *(SvPV(text,PL_na)+reallen-1) == ';') {
+ if (len == 0 || *(SvPV_nolen(text)+reallen-1) == ';') {
CROAK(("The result of B::Deparse::coderef2text was empty - maybe you're trying to serialize an XS function?\n"));
}
@@ -2444,13 +2444,13 @@ static int store_code(stcxt_t *cxt, CV *cv)
PUTMARK(SX_CODE);
TRACEME(("size = %d", len));
- TRACEME(("code = %s", SvPV(text,PL_na)));
+ TRACEME(("code = %s", SvPV_nolen(text)));
/*
* Now store the source code.
*/
- STORE_SCALAR(SvPV(text,PL_na), len);
+ STORE_SCALAR(SvPV_nolen(text), len);
FREETMPS;
LEAVE;
@@ -4972,7 +4972,7 @@ static SV *retrieve_code(stcxt_t *cxt, char *cname)
*/
sub = newSVpvn("sub ", 4);
- sv_catpv(sub, SvPV(text, PL_na)); /* XXX no sv_catsv! */
+ sv_catpv(sub, SvPV_nolen(text)); /* XXX no sv_catsv! */
SvREFCNT_dec(text);
/*
@@ -5011,16 +5011,17 @@ static SV *retrieve_code(stcxt_t *cxt, char *cname)
CROAK(("Unexpected return value from $Storable::Eval callback\n"));
cv = POPs;
if (SvTRUE(errsv)) {
- CROAK(("code %s caused an error: %s", SvPV(sub, PL_na), SvPV(errsv, PL_na)));
+ CROAK(("code %s caused an error: %s",
+ SvPV_nolen(sub), SvPV_nolen(errsv)));
}
PUTBACK;
} else {
- cv = eval_pv(SvPV(sub, PL_na), TRUE);
+ cv = eval_pv(SvPV_nolen(sub), TRUE);
}
if (cv && SvROK(cv) && SvTYPE(SvRV(cv)) == SVt_PVCV) {
sv = SvRV(cv);
} else {
- CROAK(("code %s did not evaluate to a subroutine reference\n", SvPV(sub, PL_na)));
+ CROAK(("code %s did not evaluate to a subroutine reference\n", SvPV_nolen(sub)));
}
SvREFCNT_inc(sv); /* XXX seems to be necessary */