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
e5072d10
Commit
e5072d10
authored
May 06, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Move struct vmod_data to VPI namespace"
This reverts commit
f9c9db4a
.
parent
f9c9db4a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
27 deletions
+25
-27
cache_vrt_vmod.c
bin/varnishd/cache/cache_vrt_vmod.c
+2
-2
vcc_interface.h
include/vcc_interface.h
+0
-19
vrt.h
include/vrt.h
+19
-1
vcc_vmod.c
lib/libvcc/vcc_vmod.c
+1
-2
vmodtool.py
lib/libvcc/vmodtool.py
+3
-3
No files found.
bin/varnishd/cache/cache_vrt_vmod.c
View file @
e5072d10
...
...
@@ -68,7 +68,7 @@ struct vmod {
static
VTAILQ_HEAD
(,
vmod
)
vmods
=
VTAILQ_HEAD_INITIALIZER
(
vmods
);
static
unsigned
vmod_abi_mismatch
(
const
struct
v
pi_v
mod_data
*
d
)
vmod_abi_mismatch
(
const
struct
vmod_data
*
d
)
{
if
(
d
->
vrt_major
==
0
&&
d
->
vrt_minor
==
0
)
...
...
@@ -83,7 +83,7 @@ VPI_Vmod_Init(VRT_CTX, struct vmod **hdl, unsigned nbr, void *ptr, int len,
const
char
*
nm
,
const
char
*
path
,
const
char
*
file_id
,
const
char
*
backup
)
{
struct
vmod
*
v
;
const
struct
v
pi_v
mod_data
*
d
;
const
struct
vmod_data
*
d
;
char
buf
[
256
];
void
*
dlhdl
;
...
...
include/vcc_interface.h
View file @
e5072d10
...
...
@@ -37,25 +37,6 @@ VCL_VCL VPI_vcl_get(VRT_CTX, const char *);
void
VPI_vcl_rel
(
VRT_CTX
,
VCL_VCL
);
void
VPI_vcl_select
(
VRT_CTX
,
VCL_VCL
);
/***********************************************************************
* This is the interface structure to a compiled VMOD
*/
struct
vpi_vmod_data
{
/* The version/id fields must be first, they protect the rest */
unsigned
vrt_major
;
unsigned
vrt_minor
;
const
char
*
file_id
;
const
char
*
name
;
const
char
*
func_name
;
const
void
*
func
;
int
func_len
;
const
char
*
proto
;
const
char
*
json
;
const
char
*
abi
;
};
/***********************************************************************
* VPI_count() refers to this structure for coordinates into the VCL source.
*/
...
...
include/vrt.h
View file @
e5072d10
...
...
@@ -52,7 +52,6 @@
* binary/load-time compatible, increment MAJOR version
*
* unreleased (planned for 2019-09-15)
* struct vmod_data moved to vcc_interface.h
* VRT_Vmod_{Init|Unload} moved to vcc_interface.h
* VRT_count moved to vcc_interface.h
* VRT_VCL_Busy() and VRT_VCL_Unbusy() added.
...
...
@@ -271,6 +270,25 @@ struct vrt_ctx {
#define VRT_CTX const struct vrt_ctx *ctx
/***********************************************************************
* This is the interface structure to a compiled VMOD
*/
struct
vmod_data
{
/* The version/id fields must be first, they protect the rest */
unsigned
vrt_major
;
unsigned
vrt_minor
;
const
char
*
file_id
;
const
char
*
name
;
const
char
*
func_name
;
const
void
*
func
;
int
func_len
;
const
char
*
proto
;
const
char
*
json
;
const
char
*
abi
;
};
/***********************************************************************
* Enum for events sent to compiled VCL and from there to Vmods
*/
...
...
lib/libvcc/vcc_vmod.c
View file @
e5072d10
...
...
@@ -38,7 +38,6 @@
#include "vfil.h"
#include "vjsn.h"
#include "vmod_abi.h"
#include "vcc_interface.h"
#include "vsb.h"
static
int
...
...
@@ -163,7 +162,7 @@ vcc_ParseImport(struct vcc *tl)
struct
token
*
mod
,
*
t1
;
struct
inifin
*
ifp
;
struct
symbol
*
msym
;
const
struct
v
pi_v
mod_data
*
vmd
;
const
struct
vmod_data
*
vmd
;
struct
vjsn
*
vj
;
int
again
=
0
;
...
...
lib/libvcc/vmodtool.py
View file @
e5072d10
...
...
@@ -1036,8 +1036,8 @@ class vcc(object):
fo
.
write
(
'
\n
'
)
for
i
in
(
714
,
759
,
765
):
fo
.
write
(
"/*lint -esym(
%
d,
%
s) */
\n
"
%
(
i
,
vmd
))
fo
.
write
(
"
\n
extern const struct v
pi_v
mod_data
%
s;
\n
"
%
vmd
)
fo
.
write
(
"
\n
const struct v
pi_v
mod_data
%
s = {
\n
"
%
vmd
)
fo
.
write
(
"
\n
extern const struct vmod_data
%
s;
\n
"
%
vmd
)
fo
.
write
(
"
\n
const struct vmod_data
%
s = {
\n
"
%
vmd
)
if
self
.
strict_abi
:
fo
.
write
(
"
\t
.vrt_major =
\t
0,
\n
"
)
fo
.
write
(
"
\t
.vrt_minor =
\t
0,
\n
"
)
...
...
@@ -1067,7 +1067,7 @@ class vcc(object):
fo
.
write
(
'#include "config.h"
\n
'
)
fo
.
write
(
'#include <stdio.h>
\n
'
)
for
i
in
[
"vdef"
,
"vrt"
,
self
.
pfx
,
"vmod_abi"
,
"vcc_interface"
]:
for
i
in
[
"vdef"
,
"vrt"
,
self
.
pfx
,
"vmod_abi"
]:
fo
.
write
(
'#include "
%
s.h"
\n
'
%
i
)
fo
.
write
(
"
\n
"
)
...
...
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