Commit 30885ed8 authored by Geoff Simmons's avatar Geoff Simmons

De-dup a function that was accidentally copied.

parent 4159b52c
......@@ -28,26 +28,6 @@
#include "vmod_selector.h"
static struct match_data *
get_existing_match_data(VRT_CTX,
const struct vmod_selector_set * const restrict set,
const char * const restrict method)
{
struct vmod_priv *task;
struct match_data *match;
task = VRT_priv_task(ctx, set);
AN(task);
if (task->priv == NULL) {
VFAIL(ctx, "%s.%s() called without prior match", set->vcl_name,
method);
return (NULL);
}
WS_Assert_Allocated(ctx->ws, task->priv, sizeof(*match));
CAST_OBJ(match, task->priv, MATCH_DATA_MAGIC);
return match;
}
static unsigned
select(VRT_CTX, const struct match_data * const restrict match,
const char * const restrict obj, VCL_ENUM const restrict selects,
......
......@@ -706,7 +706,7 @@ vmod_set_hasprefix(VRT_CTX, struct vmod_selector_set *set, VCL_STRING subject)
return (match->n > 0);
}
static struct match_data *
struct match_data *
get_existing_match_data(VRT_CTX,
const struct vmod_selector_set * const restrict set,
const char * const restrict method)
......
......@@ -87,3 +87,8 @@ is_added(const struct vmod_selector_set *set, unsigned idx,
return (vbit_test(set->bitmaps->bitmaps[bitmap], idx));
}
struct match_data *
get_existing_match_data(const struct vrt_ctx *ctx,
const struct vmod_selector_set * const restrict set,
const char * const restrict method);
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