diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1997-04-15 00:00:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-15 00:00:00 +1200 |
commit | 137443ea0a858c43f5a720730cac6209a7d41948 (patch) | |
tree | ea114bc1f5281a6ec91ebc67e34ed7f30571daee /regexec.c | |
parent | 683d4eee6f3b749aec29cc849f45404c6acda85e (diff) | |
download | perl-137443ea0a858c43f5a720730cac6209a7d41948.tar.gz |
[inseparable changes from patch from perl-5.003_97d to perl-5.003_97e]perl-5.003_97e
CORE LANGUAGE CHANGES
Subject: New operator: sysseek()
From: Chip Salzenberg <chip@perl.com>
Files: doio.c ext/Opcode/Makefile.PL ext/Opcode/Opcode.pm global.sym keywords.pl opcode.pl pod/perldelta.pod pod/perlfunc.pod pp_sys.c t/op/sysio.t toke.c
Subject: Allow recursive substitution again
From: Chip Salzenberg <chip@perl.com>
Files: pod/perldelta.pod pod/perldiag.pod pp_hot.c
CORE PORTABILITY
Subject: Use size_t for socket size parameters of GNU libc
From: Chip Salzenberg <chip@perl.com>
Files: doio.c pp_sys.c
Subject: Win32 update (four patches)
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: MANIFEST README.win32 dosish.h ext/SDBM_File/Makefile.PL ext/SDBM_File/sdbm/Makefile.PL ext/SDBM_File/sdbm/sdbm.c ext/SDBM_File/sdbm/sdbm.h lib/ExtUtils/MM_Unix.pm perl.c utils/perlbug.PL utils/perldoc.PL win32/Makefile win32/TEST win32/config.H win32/config.w32 win32/config_h.PL win32/config_sh.PL win32/perllib.c win32/runperl.c win32/win32.c win32/win32io.c win32/win32sck.c
DOCUMENTATION
Subject: Add CGI to perldelta.pod and improve its description in MANIFEST
From: Chip Salzenberg <chip@perl.com>
Files: MANIFEST pod/perldelta.pod
Subject: Describe probs with majordomo 1.94.1
From: Chip Salzenberg <chip@perl.com>
Files: pod/perldelta.pod
Subject: Fix description of /\G/g
From: Chip Salzenberg <chip@perl.com>
Files: pod/perlop.pod
Subject: Mention '...' operator in precedence table
Date: Sun, 13 Apr 1997 11:24:16 -0600
From: Tom Christiansen <tchrist@perl.com>
Files: pod/perlop.pod
private-msgid: 199704131724.LAA23120@jhereg.perl.com
OTHER CORE CHANGES
Subject: New API function: perl_eval_pv()
Date: Mon, 14 Apr 1997 17:13:41 -0400
From: Doug MacEachern <dougm@opengroup.org>
Files: perl.c pod/perlcall.pod pod/perldelta.pod pod/perlembed.pod pod/perlguts.pod proto.h
private-msgid: 199704142113.RAA06823@postman.osf.org
Subject: Fix C< s//whatever/ >, which reuses old pattern
From: Chip Salzenberg <chip@perl.com>
Files: pp_hot.c regexec.c
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 32 |
1 files changed, 20 insertions, 12 deletions
@@ -529,18 +529,26 @@ got_it: prog->exec_tainted = regtainted; /* make sure $`, $&, $', and $digit will work later */ - if (!safebase && (strbeg != prog->subbase)) { - I32 i = strend - startpos + (stringarg - strbeg); - s = savepvn(strbeg, i); - Safefree(prog->subbase); - prog->subbase = s; - prog->subbeg = prog->subbase; - prog->subend = prog->subbase + i; - s = prog->subbase + (stringarg - strbeg); - for (i = 0; i <= prog->nparens; i++) { - if (prog->endp[i]) { - prog->startp[i] = s + (prog->startp[i] - startpos); - prog->endp[i] = s + (prog->endp[i] - startpos); + if (strbeg != prog->subbase) { + if (safebase) { + if (prog->subbase) { + Safefree(prog->subbase); + prog->subbase = Nullch; + } + } + else { + I32 i = strend - startpos + (stringarg - strbeg); + s = savepvn(strbeg, i); + Safefree(prog->subbase); + prog->subbase = s; + prog->subbeg = prog->subbase; + prog->subend = prog->subbase + i; + s = prog->subbase + (stringarg - strbeg); + for (i = 0; i <= prog->nparens; i++) { + if (prog->endp[i]) { + prog->startp[i] = s + (prog->startp[i] - startpos); + prog->endp[i] = s + (prog->endp[i] - startpos); + } } } } |