]> git.vpit.fr Git - perl/modules/Sub-Op.git/blob - sub_op.h
Add preliminary support for hooking reference constructors
[perl/modules/Sub-Op.git] / sub_op.h
1 /* This file is part of the Sub::Op Perl module.
2  * See http://search.cpan.org/dist/Sub-Op/ */
3
4 #ifndef SUB_OP_H
5 #define SUB_OP_H 1
6
7 typedef OP *(*sub_op_check_t)(pTHX_ OP *, void *);
8
9 typedef struct {
10  const char    *name;
11  STRLEN         namelen;
12  const char    *proto;
13  STRLEN         protolen;
14  Perl_ppaddr_t  pp;
15  sub_op_check_t check;
16  sub_op_check_t ref;
17  void          *ud;
18 } sub_op_config_t;
19
20 #define SUB_OP_REGISTER_STEAL 1
21
22 void             sub_op_init    (sub_op_config_t *c);
23 void             sub_op_register(pTHX_ const sub_op_config_t *c, U32 flags);
24 sub_op_config_t *sub_op_dup     (pTHX_ const sub_op_config_t *c);
25 void             sub_op_free    (pTHX_ sub_op_config_t *c);
26
27 #endif /* SUB_OP_H */