diff options
author | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1994-04-04 00:00:00 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1994-04-04 00:00:00 +0000 |
commit | 2304df62caa7d9be70e8b8bcdb454e139c9c103d (patch) | |
tree | 98a456ef0fbe59b1a02bfe68afa4a3d9afb4f21c /regexec.c | |
parent | 8990e3071044a96302560bbdb5706f3e74cf1bef (diff) | |
download | perl-2304df62caa7d9be70e8b8bcdb454e139c9c103d.tar.gz |
perl 5.0 alpha 8
[the last one taken from the September '94 InfoMagic CD; a similar
style of cleanup as the previous commits was performed]
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -432,10 +432,12 @@ I32 safebase; /* no need to remember string in subbase */ prog->subend = strend; if ((!safebase && (prog->nparens || sawampersand)) || prog->do_folding){ strend += dontbother; /* uncheat */ - if (safebase) /* no need for $digit later */ + i = strend - string + (stringarg - strbeg); + if (safebase) { /* no need for $digit later */ s = strbeg; + prog->subend = s+i; + } else if (strbeg != prog->subbase) { - i = strend - string + (stringarg - strbeg); s = nsavestr(strbeg,i); /* so $digit will work later */ if (prog->subbase) Safefree(prog->subbase); @@ -443,7 +445,6 @@ I32 safebase; /* no need to remember string in subbase */ prog->subend = s+i; } else { - i = strend - string + (stringarg - strbeg); prog->subbeg = s = prog->subbase; prog->subend = s+i; } |