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
40a253bd
Commit
40a253bd
authored
May 26, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify
parent
d982e81a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
32 deletions
+13
-32
vsc.c
lib/libvarnishapi/vsc.c
+13
-32
No files found.
lib/libvarnishapi/vsc.c
View file @
40a253bd
...
...
@@ -100,26 +100,28 @@ struct vsc {
struct
VSM_fantom
iter_fantom
;
};
/*
*********************************************************************
*
Precompiled VSC_type_desc's and VSC_desc's for all know VSCs.
/*
--------------------------------------------------------------------
*
Build the static level, type and point descriptions
*/
#define VSC_LEVEL_F(v,l,e,d) \
extern const struct VSC_level_desc VSC_level_desc_##v;
const struct VSC_level_desc VSC_level_desc_##v = \
{VSC_level_##v, l, e, d};
#include "tbl/vsc_levels.h"
#undef VSC_LEVEL_F
#define VSC_TYPE_F(n,t,l,e,d) const char *VSC_type_##n = t;
#include "tbl/vsc_types.h"
#define VSC_TYPE_F(n,t,l,e,d) \
extern const struct VSC_type_desc VSC_type_desc_##n
;
const struct VSC_type_desc VSC_type_desc_##n = {l,e,d}
;
#include "tbl/vsc_types.h"
#undef VSC_TYPE_F
#define VSC_DO(U,l,t,h)
extern const struct VSC_desc VSC_desc_##l[];
#define VSC_F(n,t,l,s,f,v,d,e)
#define VSC_DONE(U,l,t)
#define VSC_DO(U,l,t,h)
const struct VSC_desc VSC_desc_##l[] = {
#define VSC_F(n,t,l,s,f,v,d,e)
{#n,#t,s,f,&VSC_level_desc_##v,d,e},
#define VSC_DONE(U,l,t)
};
#include "tbl/vsc_all.h"
/*--------------------------------------------------------------------*/
static
struct
vsc
*
...
...
@@ -496,24 +498,3 @@ VSC_LevelDesc(unsigned level)
}
}
/*--------------------------------------------------------------------
* Build the static level, type and point descriptions
*/
#define VSC_LEVEL_F(v,l,e,d) \
const struct VSC_level_desc VSC_level_desc_##v = \
{VSC_level_##v, l, e, d};
#include "tbl/vsc_levels.h"
#undef VSC_LEVEL_F
#define VSC_TYPE_F(n,t,l,e,d) const char *VSC_type_##n = t;
#include "tbl/vsc_types.h"
#define VSC_TYPE_F(n,t,l,e,d) \
const struct VSC_type_desc VSC_type_desc_##n = {l,e,d};
#include "tbl/vsc_types.h"
#define VSC_DO(U,l,t,h) const struct VSC_desc VSC_desc_##l[] = {
#define VSC_F(n,t,l,s,f,v,d,e) {#n,#t,s,f,&VSC_level_desc_##v,d,e},
#define VSC_DONE(U,l,t) };
#include "tbl/vsc_all.h"
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