summaryrefslogtreecommitdiffabout
path: root/src/variable.c
Side-by-side diff
Diffstat (limited to 'src/variable.c') (more/less context) (show whitespace changes)
-rw-r--r--src/variable.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/variable.c b/src/variable.c
index 8e75ea2..feaaa21 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -1,3 +1,3 @@
/* This file is part of vmod-variable
- Copyright (C) 2013-2016 Sergey Poznyakoff
+ Copyright (C) 2013-2017 Sergey Poznyakoff
@@ -26,5 +26,4 @@
#include "pthread.h"
+#include "cache/cache.h"
-#include "bin/varnishd/cache/cache.h"
-#define VARIABLE_CTX const struct vrt_ctx *
#define WSPTR(s) ((s)->ws)
@@ -310,3 +309,3 @@ static pthread_mutex_t global_mtx = PTHREAD_MUTEX_INITIALIZER;
VCL_VOID
-vmod_global_set(VARIABLE_CTX ctx, VCL_STRING name, VCL_STRING value)
+vmod_global_set(VRT_CTX, VCL_STRING name, VCL_STRING value)
{
@@ -333,3 +332,3 @@ vmod_global_set(VARIABLE_CTX ctx, VCL_STRING name, VCL_STRING value)
VCL_STRING
-vmod_global_get(VARIABLE_CTX ctx, VCL_STRING name)
+vmod_global_get(VRT_CTX, VCL_STRING name)
{
@@ -352,3 +351,3 @@ vmod_global_get(VARIABLE_CTX ctx, VCL_STRING name)
VCL_BOOL
-vmod_global_defined(VARIABLE_CTX ctx, VCL_STRING name)
+vmod_global_defined(VRT_CTX, VCL_STRING name)
{
@@ -358,3 +357,3 @@ vmod_global_defined(VARIABLE_CTX ctx, VCL_STRING name)
VCL_VOID
-vmod_global_clear(VARIABLE_CTX ctx)
+vmod_global_clear(VRT_CTX)
{
@@ -366,3 +365,3 @@ vmod_global_clear(VARIABLE_CTX ctx)
VCL_VOID
-vmod_global_unset(VARIABLE_CTX ctx, VCL_STRING name)
+vmod_global_unset(VRT_CTX, VCL_STRING name)
{
@@ -408,3 +407,3 @@ defvar(struct symtab *vt, const char *name, enum variable_type t,
VCL_VOID
-vmod_clear(VARIABLE_CTX ctx, struct vmod_priv *priv)
+vmod_clear(VRT_CTX, struct vmod_priv *priv)
{
@@ -414,3 +413,3 @@ vmod_clear(VARIABLE_CTX ctx, struct vmod_priv *priv)
VCL_STRING
-vmod_get_string(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_get_string(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -423,3 +422,3 @@ vmod_get_string(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
VCL_VOID
-vmod_set_string(VARIABLE_CTX ctx, struct vmod_priv *priv,
+vmod_set_string(VRT_CTX, struct vmod_priv *priv,
VCL_STRING name, VCL_STRING value)
@@ -434,3 +433,3 @@ vmod_set_string(VARIABLE_CTX ctx, struct vmod_priv *priv,
VCL_STRING
-vmod_get(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_get(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -440,3 +439,3 @@ vmod_get(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
VCL_VOID
-vmod_set(VARIABLE_CTX ctx, struct vmod_priv *priv,
+vmod_set(VRT_CTX, struct vmod_priv *priv,
VCL_STRING name, VCL_STRING value)
@@ -449,3 +448,3 @@ vmod_set(VARIABLE_CTX ctx, struct vmod_priv *priv,
vcl_type \
-__cat__(vmod_get_,r_type)(VARIABLE_CTX ctx, struct vmod_priv *priv, \
+__cat__(vmod_get_,r_type)(VRT_CTX, struct vmod_priv *priv, \
VCL_STRING name) \
@@ -460,3 +459,3 @@ __cat__(vmod_get_,r_type)(VARIABLE_CTX ctx, struct vmod_priv *priv, \
VCL_VOID \
-__cat__(vmod_set_,r_type)(VARIABLE_CTX ctx, struct vmod_priv *priv, \
+__cat__(vmod_set_,r_type)(VRT_CTX, struct vmod_priv *priv, \
VCL_STRING name, \
@@ -479,3 +478,3 @@ DEF(duration, VCL_DURATION, d)
VCL_BOOL
-vmod_defined(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_defined(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -485,3 +484,3 @@ vmod_defined(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
VCL_STRING
-vmod_type_of(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_type_of(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -492,3 +491,3 @@ vmod_type_of(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
VCL_VOID
-vmod_unset(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_unset(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -706,3 +705,3 @@ setval(union value *val, const char *s, enum variable_type type, char **err)
VCL_VOID
-vmod_regset(VARIABLE_CTX ctx, struct vmod_priv *priv,
+vmod_regset(VRT_CTX, struct vmod_priv *priv,
VCL_STRING vars, VCL_STRING rxs, VCL_STRING input)
@@ -882,3 +881,3 @@ define_param(struct symtab *vt, struct vardef *def,
VCL_VOID
-vmod_queryset(VARIABLE_CTX ctx, struct vmod_priv *priv,
+vmod_queryset(VRT_CTX, struct vmod_priv *priv,
VCL_STRING vars, VCL_STRING query)

Return to:

Send suggestions and report system problems to the System administrator.