summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorFlorian Ragwitz <rafl@debian.org>2010-07-23 08:38:13 +0200
committerFlorian Ragwitz <rafl@debian.org>2010-07-25 18:45:34 +0200
commit65bfe90c4b4ea5706a50067179e60d4e8de6807a (patch)
tree4abe6c1a81cf9af0fe806c73edad64f99c042c5f /proto.h
parenta767f83cfc2d7d70f2c373cc53d3166863982d0a (diff)
downloadperl-65bfe90c4b4ea5706a50067179e60d4e8de6807a.tar.gz
Make the peep recurse via PL_peepp
Also allows extensions, when delegating to Perl_peep, to specify what function it should use when recursing into a part of the op tree. The usecase for this are extensions like namespace::alias, which need to hook into the peep to do their thing. With this change they can stop copying the whole peep only to add tiny bits of new behaviour to it, allowing them to work easier on a large variety of perls, without having to maintain one peep which works on all of them (which is HARD!).
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/proto.h b/proto.h
index 8ad7e66144..274509ad5d 100644
--- a/proto.h
+++ b/proto.h
@@ -2570,7 +2570,11 @@ PERL_CALLCONV void Perl_pad_free(pTHX_ PADOFFSET po);
STATIC void S_pad_reset(pTHX);
#endif
PERL_CALLCONV void Perl_pad_swipe(pTHX_ PADOFFSET po, bool refadjust);
-PERL_CALLCONV void Perl_peep(pTHX_ OP* o);
+PERL_CALLCONV void Perl_peep(pTHX_ OP* o, peep_next_t *next_peep)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_PEEP \
+ assert(next_peep)
+
PERL_CALLCONV PerlIO* Perl_start_glob(pTHX_ SV *tmpglob, IO *io)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);