summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2015-01-08 18:49:32 -0800
committerFather Chrysostomos <sprout@cpan.org>2015-01-08 19:00:57 -0800
commit9b6b7be8acad62650aa5c229e89fad6706c8a0b0 (patch)
tree07c815d34c2af0b830e9741bfff73d78f9fb74a9 /proto.h
parentcc5af3775649fc00e4d4e74d41dcad591b1fa122 (diff)
downloadperl-9b6b7be8acad62650aa5c229e89fad6706c8a0b0.tar.gz
Simplify s/// and tr/// parsing logic
These two operators were being translated into subst("","") and tr("","") by the lexer. Then pmruntime in op.c would take apart the resulting list op. Instead of constructing a list op only to take it apart again, feed the replacement part to pmruntime separately. We can achieve this by introducing a new token ('/') that the parser rec- ognizes as introducing a replacement. If we had followed this approach to begin with, then bug #123542 would never have happened. (Actually, it seems the parser did know about the replacement part to begin with, but it changed in perl-5.8.0-4047-g131b3ad to fix some overloading problems.)
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto.h b/proto.h
index 109a30379f..b72c2832ad 100644
--- a/proto.h
+++ b/proto.h
@@ -3457,7 +3457,7 @@ PERL_CALLCONV int perl_run(PerlInterpreter *my_perl)
assert(my_perl)
PERL_CALLCONV void Perl_pmop_dump(pTHX_ PMOP* pm);
-PERL_CALLCONV OP* Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg, I32 floor)
+PERL_CALLCONV OP* Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl, bool isreg, I32 floor)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_PMRUNTIME \