diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-21 12:24:40 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-21 12:24:40 +0200 |
commit | 431296aedecf7a05cd3332e885fc56b784ef00cb (patch) | |
tree | d0ee039f8bd6dee0fa06473a294f0d375dd9f0eb | |
parent | ac09b4627a15c61fe6e088e6c4bce9b1778cded4 (diff) |
Study the nick pcre patterns.
-rw-r--r-- | nick.c | 3 | ||||
-rw-r--r-- | nick.h | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -53,6 +53,7 @@ int nick_regex_add(struct nick_t *nick, const char *re_s) { free(nre); return 0; } + nre->re_e = pcre_study(nre->re, 0, &error); nre->next = NULL; @@ -73,6 +74,8 @@ void nick_free() { struct nick_regex_t *re = nick->regexes; while(re) { pcre_free(re->re); + if(re->re_e) + pcre_free(re->re_e); struct nick_regex_t *next = re->next; free(re); re = next; @@ -7,6 +7,7 @@ struct nick_t { char *name; struct nick_regex_t { pcre *re; + pcre_extra *re_e; struct nick_regex_t *next; } *regexes; struct nick_t *next; |