Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
681da739
Commit
681da739
authored
Jan 18, 2016
by
Poul-Henning Kamp
Committed by
Lasse Karstensen
Jan 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass the type of VCL method (B(ackend)/C(lient)/H(ousekeeping)
into the macro-table.
parent
15897007
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
+10
-9
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_vcl.c
bin/varnishd/cache/cache_vcl.c
+2
-2
generate.py
lib/libvcc/generate.py
+4
-3
vcc_compile.c
lib/libvcc/vcc_compile.c
+2
-2
vcc_storage.c
lib/libvcc/vcc_storage.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
681da739
...
...
@@ -1005,7 +1005,7 @@ void VCL_Refresh(struct vcl **);
void
VCL_Rel
(
struct
vcl
**
);
const
char
*
VCL_Return_Name
(
unsigned
);
#define VCL_MET_MAC(l,u,b) \
#define VCL_MET_MAC(l,u,
t,
b) \
void VCL_##l##_method(struct vcl *, struct worker *, struct req *, \
struct busyobj *bo, void *specific);
#include "tbl/vcl_returns.h"
...
...
bin/varnishd/cache/cache_vcl.c
View file @
681da739
...
...
@@ -129,7 +129,7 @@ VCL_Method_Name(unsigned m)
{
switch
(
m
)
{
#define VCL_MET_MAC(func, upper, bitmap) case VCL_MET_##upper: return (#upper);
#define VCL_MET_MAC(func, upper,
typ,
bitmap) case VCL_MET_##upper: return (#upper);
#include "tbl/vcl_returns.h"
#undef VCL_MET_MAC
default:
...
...
@@ -905,7 +905,7 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo,
assert
(
aws
==
WS_Snapshot
(
wrk
->
aws
));
}
#define VCL_MET_MAC(func, upper, bitmap) \
#define VCL_MET_MAC(func, upper,
typ,
bitmap) \
void \
VCL_##func##_method(struct vcl *vcl, struct worker *wrk, \
struct req *req, struct busyobj *bo, void *specific) \
...
...
lib/libvcc/generate.py
View file @
681da739
...
...
@@ -139,11 +139,11 @@ returns =(
# Housekeeping
(
'init'
,
""
,
"
H
"
,
(
'ok'
,
'fail'
)
),
(
'fini'
,
""
,
"
H
"
,
(
'ok'
,)
),
)
...
...
@@ -993,7 +993,8 @@ fo.write("#endif\n")
fo
.
write
(
"
\n
#ifdef VCL_MET_MAC
\n
"
)
for
i
in
ll
:
fo
.
write
(
"VCL_MET_MAC(
%
s,
%
s,"
%
(
i
[
0
]
.
lower
(),
i
[
0
]
.
upper
()))
fo
.
write
(
"VCL_MET_MAC(
%
s,
%
s,
%
s,"
%
(
i
[
0
]
.
lower
(),
i
[
0
]
.
upper
(),
i
[
1
]))
p
=
" (
\n\t
"
lll
=
list
(
i
[
2
])
lll
.
sort
()
...
...
lib/libvcc/vcc_compile.c
View file @
681da739
...
...
@@ -66,7 +66,7 @@
struct
method
method_tab
[]
=
{
{
"none"
,
0U
,
0
},
#define VCL_MET_MAC(l,U,
m) { "vcl_"#l, m
, VCL_MET_##U },
#define VCL_MET_MAC(l,U,
t,b) { "vcl_"#l, b
, VCL_MET_##U },
#include "tbl/vcl_returns.h"
#undef VCL_MET_MAC
{
NULL
,
0U
,
0
}
...
...
@@ -483,7 +483,7 @@ EmitStruct(const struct vcc *tl)
Fc
(
tl
,
0
,
"
\t
.nsrc = VGC_NSRCS,
\n
"
);
Fc
(
tl
,
0
,
"
\t
.srcname = srcname,
\n
"
);
Fc
(
tl
,
0
,
"
\t
.srcbody = srcbody,
\n
"
);
#define VCL_MET_MAC(l,u,b) \
#define VCL_MET_MAC(l,u,
t,
b) \
Fc(tl, 0, "\t." #l "_func = VGC_function_vcl_" #l ",\n");
#include "tbl/vcl_returns.h"
#undef VCL_MET_MAC
...
...
lib/libvcc/vcc_storage.c
View file @
681da739
...
...
@@ -77,7 +77,7 @@ vcc_Stv_mkvar(struct vcc *tl, const struct token *t, enum var_type fmt)
v
->
name
=
TlDupTok
(
tl
,
t
);
v
->
r_methods
=
0
;
#define VCL_MET_MAC(l,u,b) v->r_methods |= VCL_MET_##u;
#define VCL_MET_MAC(l,u,
t,
b) v->r_methods |= VCL_MET_##u;
#include "tbl/vcl_returns.h"
#undef VCL_MET_MAC
v
->
fmt
=
fmt
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment