diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-06-27 17:58:10 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-07-01 14:05:40 +0200 |
commit | 75fc7bf602cd498829b35780623ebe139c0a0483 (patch) | |
tree | 63b0614fc1223a0d33bb7947ab2072a979e9f537 /pp.c | |
parent | 56e9eeb1a239fc995bf33475e31f8379bd01cbad (diff) | |
download | perl-75fc7bf602cd498829b35780623ebe139c0a0483.tar.gz |
Merge PL_scream{first,next} into one allocated buffer.
Effectively, PL_screamnext is now PL_screamfirst + 256. The actual interpreter
variable PL_screamnext is eliminated.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -740,24 +740,21 @@ PP(pp_study) if (pos > PL_maxscream) { if (PL_maxscream < 0) { PL_maxscream = pos + 80; - Newx(PL_screamfirst, 256, I32); - Newx(PL_screamnext, PL_maxscream, I32); + Newx(PL_screamfirst, 256 + PL_maxscream, I32); } else { PL_maxscream = pos + pos / 4; - Renew(PL_screamnext, PL_maxscream, I32); + Renew(PL_screamfirst, 256 + PL_maxscream, I32); } } - sfirst = PL_screamfirst; - snext = PL_screamnext; + snext = sfirst = PL_screamfirst; - if (!sfirst || !snext) + if (!sfirst) DIE(aTHX_ "do_study: out of memory"); for (ch = 256; ch; --ch) - *sfirst++ = -1; - sfirst -= 256; + *snext++ = -1; while (--pos >= 0) { register const I32 ch = s[pos]; |