aboutsummaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/match.c b/match.c
index 286c077..5b99bce 100644
--- a/match.c
+++ b/match.c
@@ -664,25 +664,4 @@ size_t free_all_matches(void)
}
#endif
-//
-// Deallocate memory referenced inside a pattern struct
-//
-void destroy_pat(pat_t *pat)
-{
- switch (pat->type) {
- case VM_STRING: case VM_REF:
- xfree(&pat->args.s);
- break;
- case VM_CAPTURE:
- if (pat->args.capture.name)
- xfree(&pat->args.capture.name);
- break;
- case VM_REPLACE:
- if (pat->args.replace.text)
- xfree(&pat->args.replace.text);
- break;
- default: break;
- }
-}
-
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1