summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
Diffstat (limited to 'op.h')
-rw-r--r--op.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/op.h b/op.h
index 71bab3e3b3..5135ff0c24 100644
--- a/op.h
+++ b/op.h
@@ -622,6 +622,21 @@ struct loop {
#define ref(o, type) doref(o, type, TRUE)
#endif
+/*
+=head1 Optree Manipulation Functions
+
+=for apidoc Am|OP*|LINKLIST|OP *o
+Given the root of an optree, link the tree in execution order using the
+C<op_next> pointers and return the first op executed. If this has
+already been done, it will not be redone, and C<< o->op_next >> will be
+returned. If C<< o->op_next >> is not already set, I<o> should be at
+least an C<UNOP>.
+
+=cut
+*/
+
+#define LINKLIST(o) ((o)->op_next ? (o)->op_next : op_linklist((OP*)o))
+
/* no longer used anywhere in core */
#ifndef PERL_CORE
#define cv_ckproto(cv, gv, p) \