summaryrefslogtreecommitdiff
path: root/intrpvar.h
diff options
context:
space:
mode:
authorVincent Pit <vince@profvince.com>2009-07-15 22:32:36 +0200
committerVincent Pit <perl@profvince.com>2009-07-15 22:44:57 +0200
commit2f175318a4bf1a5a0d3c3dfabb9a049ffc16c4e9 (patch)
treedc4c050166658a591945101f340760f2769bf316 /intrpvar.h
parent799dfa8f13d23040c29f657b9be4b8c752194cac (diff)
downloadperl-2f175318a4bf1a5a0d3c3dfabb9a049ffc16c4e9.tar.gz
Document PL_opfreehook
Diffstat (limited to 'intrpvar.h')
-rw-r--r--intrpvar.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h
index 975bab07cf..9f8e443f09 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -170,6 +170,18 @@ PERLVARA(Icolors,6, char *) /* from regcomp.c */
PERLVARI(Ipeepp, peep_t, MEMBER_TO_FPTR(Perl_peep))
/* Pointer to peephole optimizer */
+/*
+=for apidoc Amn|Perl_ophook_t|PL_opfreehook
+
+When non-C<NULL>, the function pointed by this variable will be called each time an OP is freed with the corresponding OP as the argument.
+This allows extensions to free any extra attribute they have locally attached to an OP.
+It is also assured to first fire for the parent OP and then for its kids.
+
+When you replace this variable, it is considered a good practice to store the possibly previously installed hook and that you recall it inside your own.
+
+=cut
+*/
+
PERLVARI(Iopfreehook, Perl_ophook_t, 0) /* op_free() hook */
PERLVARI(Imaxscream, I32, -1)