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
a971e6c3
Commit
a971e6c3
authored
Nov 28, 2019
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline type methods definitions
parent
7d27ba04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
vcc_types.c
lib/libvcc/vcc_types.c
+21
-0
No files found.
lib/libvcc/vcc_types.c
View file @
a971e6c3
...
...
@@ -42,9 +42,15 @@ const struct type ACL[1] = {{
.
tostring
=
"((
\v
1)->name)"
,
}};
static
const
struct
vcc_method
backend_methods
[]
=
{
{
BACKEND
,
"resolve"
,
"VRT_VDI_Resolve(ctx,
\v
1)"
,
1
},
{
NULL
},
};
const
struct
type
BACKEND
[
1
]
=
{{
.
magic
=
TYPE_MAGIC
,
.
name
=
"BACKEND"
,
.
methods
=
backend_methods
,
.
tostring
=
"VRT_BACKEND_string(
\v
1)"
,
}};
...
...
@@ -125,9 +131,17 @@ const struct type REAL[1] = {{
.
multype
=
REAL
,
}};
static
const
struct
vcc_method
stevedore_methods
[]
=
{
#define VRTSTVVAR(nm, vtype, ctype, dval) \
{ vtype, #nm, "VRT_stevedore_" #nm "(\v1)", 0},
#include "tbl/vrt_stv_var.h"
{
NULL
},
};
const
struct
type
STEVEDORE
[
1
]
=
{{
.
magic
=
TYPE_MAGIC
,
.
name
=
"STEVEDORE"
,
.
methods
=
stevedore_methods
,
.
tostring
=
"VRT_STEVEDORE_string(
\v
1)"
,
}};
...
...
@@ -144,9 +158,16 @@ const struct type STRANDS[1] = {{
.
tostring
=
"VRT_CollectStrands(ctx,
\v
+
\n\v
1
\v
-
\n
)"
,
}};
static
const
struct
vcc_method
strings_methods
[]
=
{
{
STRING
,
"upper"
,
"VRT_UpperLowerStrands(ctx,
\v
T, 1)"
,
1
},
{
STRING
,
"lower"
,
"VRT_UpperLowerStrands(ctx,
\v
T, 0)"
,
1
},
{
NULL
},
};
const
struct
type
STRINGS
[
1
]
=
{{
.
magic
=
TYPE_MAGIC
,
.
name
=
"STRINGS"
,
.
methods
=
strings_methods
,
.
tostring
=
""
,
}};
...
...
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