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
3f9ca3fc
Commit
3f9ca3fc
authored
Aug 23, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assign VMODS unique numbers, and make the count part of the VGC metadata
parent
b5aaa542
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
1 deletion
+5
-1
generate.py
lib/libvcc/generate.py
+2
-0
vcc_compile.c
lib/libvcc/vcc_compile.c
+1
-0
vcc_compile.h
lib/libvcc/vcc_compile.h
+1
-1
vcc_vmod.c
lib/libvcc/vcc_vmod.c
+1
-0
No files found.
lib/libvcc/generate.py
View file @
3f9ca3fc
...
...
@@ -666,6 +666,8 @@ struct VCL_conf {
const char **srcname;
const char **srcbody;
unsigned nvmod;
vcl_event_f *event_vcl;
"""
)
...
...
lib/libvcc/vcc_compile.c
View file @
3f9ca3fc
...
...
@@ -424,6 +424,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
"
);
Fc
(
tl
,
0
,
"
\t
.nvmod = %u,
\n
"
,
tl
->
vmod_count
);
#define VCL_MET_MAC(l,u,t,b) \
Fc(tl, 0, "\t." #l "_func = VGC_function_vcl_" #l ",\n");
#include "tbl/vcl_returns.h"
...
...
lib/libvcc/vcc_compile.h
View file @
3f9ca3fc
...
...
@@ -252,7 +252,7 @@ struct vcc {
const
char
*
default_probe
;
unsigned
unique
;
unsigned
vmod_count
;
};
struct
method
{
...
...
lib/libvcc/vcc_vmod.c
View file @
3f9ca3fc
...
...
@@ -336,6 +336,7 @@ vcc_ParseImport(struct vcc *tl)
vcc_json_always
(
tl
,
msym
);
Fh
(
tl
,
0
,
"
\n
/* --- BEGIN VMOD %.*s --- */
\n\n
"
,
PF
(
mod
));
Fh
(
tl
,
0
,
"#define VMOD_NUMBER_%.*s %u
\n
"
,
PF
(
mod
),
tl
->
vmod_count
++
);
Fh
(
tl
,
0
,
"static struct vmod *VGC_vmod_%.*s;
\n
"
,
PF
(
mod
));
Fh
(
tl
,
0
,
"static struct vmod_priv vmod_priv_%.*s;
\n
"
,
PF
(
mod
));
Fh
(
tl
,
0
,
"
\n
%s
\n
"
,
vmd
->
proto
);
...
...
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