diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-10 22:06:15 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-10 22:06:15 +0000 |
commit | 349d4f2f3d114fbec6897c6007862eb07a409a2d (patch) | |
tree | a43bbcb031855718e48d719d10f6ef5ec6f3752d /pp_pack.c | |
parent | 93524f2be2dba9389167a137d53a88545322b55e (diff) | |
download | perl-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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++; |