commit | 7035132349ed8cf62157eaec3453be88dbf3586e | [log] [tgz] |
---|---|---|
author | Hiroaki Nakamura <hnakamur@gmail.com> | Sun Jan 13 15:00:42 2013 +0900 |
committer | Willy Tarreau <w@1wt.eu> | Tue Apr 02 00:02:54 2013 +0200 |
tree | a596185b22ad68be9b20abda956fb8efb2851cee | |
parent | 0fbf016508b66c72ec82abc54c9d5806bdf061c5 [diff] [blame] |
MEDIUM: regex: Use PCRE JIT in acl This is a patch for using PCRE JIT in acl. I notice regex are used in other places, but they are more complicated to modify to use PCRE APIs. So I focused to acl in the first try. BTW, I made a simple benchmark program for PCRE JIT beforehand. https://github.com/hnakamur/pcre-jit-benchmark I read the manual for PCRE JIT http://www.manpagez.com/man/3/pcrejit/ and wrote my benchmark program. https://github.com/hnakamur/pcre-jit-benchmark/blob/master/test-pcre.c
diff --git a/include/types/acl.h b/include/types/acl.h index bf5537f..2b0de0c 100644 --- a/include/types/acl.h +++ b/include/types/acl.h
@@ -213,7 +213,7 @@ union { void *ptr; /* any data */ char *str; /* any string */ - regex_t *reg; /* a compiled regex */ + regex *reg; /* a compiled regex */ } ptr; /* indirect values, allocated */ void(*freeptrbuf)(void *ptr); /* a destructor able to free objects from the ptr */ int len; /* data length when required */