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
f8bc0ea3
Commit
f8bc0ea3
authored
Jun 03, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an empty lookup table for type based methods, while I find out
how vcc_expr actually works...
parent
340abd04
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
7 deletions
+33
-7
vcc_expr.c
lib/libvcc/vcc_expr.c
+33
-7
No files found.
lib/libvcc/vcc_expr.c
View file @
f8bc0ea3
...
@@ -805,15 +805,38 @@ vcc_expr5(struct vcc *tl, struct expr **e, vcc_type_t fmt)
...
@@ -805,15 +805,38 @@ vcc_expr5(struct vcc *tl, struct expr **e, vcc_type_t fmt)
* Expr5
* Expr5
*/
*/
static
const
struct
vcc_methods
{
vcc_type_t
type_from
;
vcc_type_t
type_to
;
const
char
*
method
;
const
char
*
impl
;
}
vcc_methods
[]
=
{
//{ BACKEND, BOOL, "healthy", "VRT_Healthy(ctx, \v1, 0)" },
{
NULL
,
NULL
,
NULL
,
NULL
},
// XXX: For Flexelint
{
NULL
,
NULL
,
NULL
,
NULL
},
};
static
void
static
void
vcc_expr4
(
struct
vcc
*
tl
,
struct
expr
**
e
,
vcc_type_t
fmt
)
vcc_expr4
(
struct
vcc
*
tl
,
struct
expr
**
e
,
vcc_type_t
fmt
)
{
{
const
struct
vcc_methods
*
vm
;
*
e
=
NULL
;
*
e
=
NULL
;
vcc_expr5
(
tl
,
e
,
fmt
);
vcc_expr5
(
tl
,
e
,
fmt
);
ERRCHK
(
tl
);
AN
(
*
e
);
while
(
tl
->
t
->
tok
==
'.'
)
{
while
(
tl
->
t
->
tok
==
'.'
)
{
vcc_NextToken
(
tl
);
vcc_NextToken
(
tl
);
ExpectErr
(
tl
,
ID
);
ExpectErr
(
tl
,
ID
);
for
(
vm
=
vcc_methods
;
vm
->
type_from
!=
NULL
;
vm
++
)
{
if
(
vm
->
type_from
==
(
*
e
)
->
fmt
&&
vcc_IdIs
(
tl
->
t
,
vm
->
method
))
break
;
}
if
(
vm
->
type_from
==
NULL
)
{
VSB_printf
(
tl
->
sb
,
"Unknown property "
);
VSB_printf
(
tl
->
sb
,
"Unknown property "
);
vcc_ErrToken
(
tl
,
tl
->
t
);
vcc_ErrToken
(
tl
,
tl
->
t
);
VSB_printf
(
tl
->
sb
,
VSB_printf
(
tl
->
sb
,
...
@@ -821,6 +844,9 @@ vcc_expr4(struct vcc *tl, struct expr **e, vcc_type_t fmt)
...
@@ -821,6 +844,9 @@ vcc_expr4(struct vcc *tl, struct expr **e, vcc_type_t fmt)
vcc_ErrWhere
(
tl
,
tl
->
t
);
vcc_ErrWhere
(
tl
,
tl
->
t
);
return
;
return
;
}
}
vcc_NextToken
(
tl
);
*
e
=
vcc_expr_edit
(
tl
,
vm
->
type_to
,
vm
->
impl
,
*
e
,
NULL
);
}
}
}
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
...
...
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