Adjust to varnish-cache api changes

parent 436b71c4
......@@ -96,7 +96,7 @@ match(VRT_CTX, vre2 * restrict vre2, VCL_STRING restrict subject,
snap = WS_Snapshot(ctx->ws);
if (!never_capture) {
ngroups++;
if (!WS_Inside(ctx->ws, subject, subject + len + 1))
if (!WS_Allocated(ctx->ws, subject, len + 1))
if ((text = WS_Copy(ctx->ws, subject, len + 1))
== NULL) {
VERRNOMEM(ctx, ERR_PREFIX "copying subject",
......
......@@ -59,5 +59,8 @@ struct vmod_re2_regex {
unsigned never_capture;
};
#define WS_Assert_Allocated(ws, ptr, len) \
AN(WS_Allocated(ws, ptr, len))
/* Defined in vmod_re2.c */
extern const char * const rewrite_name[];
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