diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-13 18:56:22 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-13 18:56:22 -0800 |
| commit | e7f94bbf50e7d68c3294efc4d437598b8b56b92d (patch) | |
| tree | 8b5a4f1318dec4690bc4ebb9ab48e8fdf2d5d8b7 /types.h | |
| parent | 9a6c0ee9ccf22d635a4bfdff6808b5716cdeca64 (diff) | |
Working towards zero memory leakage
Diffstat (limited to 'types.h')
| -rw-r--r-- | types.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -39,6 +39,7 @@ enum VMOpcode { VM_REF, VM_BACKREF, VM_NODENT, + VM_CANNED, }; struct match_s; // forward declared to resolve circular struct defs @@ -74,6 +75,12 @@ typedef struct vm_op_s { char *name; } capture; struct match_s *backref; + struct { + struct match_s *match; + unsigned int visits; + const char *at; + struct vm_op_s *fallback; + } canned; struct vm_op_s *pat; } args; } vm_op_t; @@ -86,12 +93,14 @@ typedef struct match_s { const char *start, *end; struct match_s *child, *nextsibling; vm_op_t *op; + unsigned int refcount; } match_t; // // Pattern matching rule definition(s) // typedef struct def_s { + size_t namelen; const char *name; file_t *file; vm_op_t *op; |
