]> git.vpit.fr Git - perl/modules/Sub-Op.git/blobdiff - sub_op.h
Add preliminary support for hooking reference constructors
[perl/modules/Sub-Op.git] / sub_op.h
index 20733c1888dbfb2f463fdcdb99deb4f8ab0078be..6a5d9ed2e821ec431b195838f2025209e711bd78 100644 (file)
--- a/sub_op.h
+++ b/sub_op.h
@@ -8,12 +8,20 @@ typedef OP *(*sub_op_check_t)(pTHX_ OP *, void *);
 
 typedef struct {
  const char    *name;
- STRLEN         len;
+ STRLEN         namelen;
+ const char    *proto;
+ STRLEN         protolen;
  Perl_ppaddr_t  pp;
  sub_op_check_t check;
+ sub_op_check_t ref;
  void          *ud;
 } sub_op_config_t;
 
-void sub_op_register(pTHX_ const sub_op_config_t *c);
+#define SUB_OP_REGISTER_STEAL 1
+
+void             sub_op_init    (sub_op_config_t *c);
+void             sub_op_register(pTHX_ const sub_op_config_t *c, U32 flags);
+sub_op_config_t *sub_op_dup     (pTHX_ const sub_op_config_t *c);
+void             sub_op_free    (pTHX_ sub_op_config_t *c);
 
 #endif /* SUB_OP_H */