Remove VRE options masks

varnish core code should continue to use the VRE_* options, vmods
may now pass PCRE2_* options.
parent aa2232eb
......@@ -65,14 +65,6 @@ const int VRE_ERROR_NOMATCH = PCRE2_ERROR_NOMATCH;
const unsigned VRE_CASELESS = PCRE2_CASELESS;
/*
* Even though we only have one for each case so far, keep track of masks
* to differentiate between compile and match options and enfore the hard
* VRE linkage.
*/
#define VRE_MASK_COMPILE PCRE2_CASELESS
#define VRE_MASK_MATCH 0
vre_t *
VRE_compile(const char *pattern, unsigned options,
int *errptr, int *erroffset, unsigned jit)
......@@ -81,7 +73,6 @@ VRE_compile(const char *pattern, unsigned options,
vre_t *v;
AN(pattern);
AZ(options & (~VRE_MASK_COMPILE));
AN(errptr);
AN(erroffset);
......@@ -247,7 +238,6 @@ VRE_match(const vre_t *code, const char *subject, size_t length,
CHECK_OBJ_NOTNULL(code, VRE_MAGIC);
AN(subject);
AZ(options & (~VRE_MASK_MATCH));
if (length == 0)
length = PCRE2_ZERO_TERMINATED;
......@@ -264,7 +254,6 @@ VRE_capture(const vre_t *code, const char *subject, size_t length, int options,
CHECK_OBJ_NOTNULL(code, VRE_MAGIC);
AN(subject);
AZ(options & (~VRE_MASK_MATCH));
AN(groups);
AN(count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment