]> git.vpit.fr Git - perl/modules/Sub-Op.git/blobdiff - sub_op.h
Add support for the check hook and test multiple keywords
[perl/modules/Sub-Op.git] / sub_op.h
index 161d147f80549bb5d6c6f2a5a9255198e104c4f9..c7fc83f0e9240e1c3fa8e5e3650bfd9e703c0e4b 100644 (file)
--- a/sub_op.h
+++ b/sub_op.h
@@ -4,11 +4,14 @@
 #ifndef SUB_OP_H
 #define SUB_OP_H 1
 
+typedef OP *(*sub_op_check_t)(pTHX_ OP *, void *);
+
 typedef struct {
- const char   *name;
- STRLEN        len;
- Perl_ppaddr_t pp;
- void        (*check)(pTHX_ OP *);
+ const char    *name;
+ STRLEN         len;
+ Perl_ppaddr_t  pp;
+ sub_op_check_t check;
+ void          *ud;
 } sub_op_keyword;
 
 void sub_op_register(pTHX_ const sub_op_keyword *k);