summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-10 22:06:15 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-10 22:06:15 +0000
commit349d4f2f3d114fbec6897c6007862eb07a409a2d (patch)
treea43bbcb031855718e48d719d10f6ef5ec6f3752d /pp_pack.c
parent93524f2be2dba9389167a137d53a88545322b55e (diff)
downloadperl-349d4f2f3d114fbec6897c6007862eb07a409a2d.tar.gz
More SvPV consting, including some code cleanup and living dangerously
with socket API calls. p4raw-id: //depot/perl@24799
Diffstat (limited to 'pp_pack.c')
-rw-r--r--pp_pack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp_pack.c b/pp_pack.c
index 16e724e452..dbd26d9068 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -3388,7 +3388,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist )
w_string:
/* Copy string and check for compliance */
- from = SvPV(fromstr, len);
+ from = SvPV_const(fromstr, len);
if ((norm = is_an_int(from, len)) == NULL)
Perl_croak(aTHX_ "Can only compress unsigned integers in pack");
@@ -3601,7 +3601,8 @@ PP(pp_pack)
dSP; dMARK; dORIGMARK; dTARGET;
register SV *cat = TARG;
STRLEN fromlen;
- register const char *pat = SvPVx_const(*++MARK, fromlen);
+ SV *pat_sv = *++MARK;
+ register const char *pat = SvPV_const(pat_sv, fromlen);
register const char *patend = pat + fromlen;
MARK++;