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
818f00c6
Commit
818f00c6
authored
Mar 10, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make vmod_priv_fini() a real function and name it VRT_priv_fini()
for consistency.
parent
41db0bc0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
10 deletions
+14
-10
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+10
-0
vrt.h
include/vrt.h
+1
-7
vcc_expr.c
lib/libvcc/vcc_expr.c
+1
-1
vcc_vmod.c
lib/libvcc/vcc_vmod.c
+1
-1
vmod_debug.c
lib/libvmod_debug/vmod_debug.c
+1
-1
No files found.
bin/varnishd/cache/cache_vrt.c
View file @
818f00c6
...
...
@@ -497,6 +497,16 @@ VRT_purge(const struct vrt_ctx *ctx, double ttl, double grace)
ttl
,
grace
);
}
/*--------------------------------------------------------------------
*/
void
VRT_priv_fini
(
const
struct
vmod_priv
*
p
)
{
if
(
p
->
priv
!=
(
void
*
)
0
&&
p
->
free
!=
(
void
*
)
0
)
p
->
free
(
p
->
priv
);
}
/*--------------------------------------------------------------------
* Simple stuff
*/
...
...
include/vrt.h
View file @
818f00c6
...
...
@@ -246,13 +246,7 @@ struct vmod_priv {
typedef
int
vmod_init_f
(
struct
vmod_priv
*
,
const
struct
VCL_conf
*
);
static
inline
void
vmod_priv_fini
(
const
struct
vmod_priv
*
p
)
{
if
(
p
->
priv
!=
(
void
*
)
0
&&
p
->
free
!=
(
void
*
)
0
)
p
->
free
(
p
->
priv
);
}
void
VRT_priv_fini
(
const
struct
vmod_priv
*
p
);
/* Stevedore related functions */
int
VRT_Stv
(
const
char
*
nm
);
...
...
lib/libvcc/vcc_expr.c
View file @
818f00c6
...
...
@@ -561,7 +561,7 @@ vcc_func(struct vcc *tl, struct expr **e, const char *cfunc,
bprintf
(
buf
,
"vmod_priv_%u"
,
tl
->
unique
++
);
ifp
=
New_IniFin
(
tl
);
Fh
(
tl
,
0
,
"static struct vmod_priv %s;
\n
"
,
buf
);
VSB_printf
(
ifp
->
fin
,
"
\t
vmod
_priv_fini(&%s);"
,
buf
);
VSB_printf
(
ifp
->
fin
,
"
\t
VRT
_priv_fini(&%s);"
,
buf
);
e2
=
vcc_mk_expr
(
VOID
,
"&%s"
,
buf
);
p
+=
strlen
(
p
)
+
1
;
}
else
if
(
fmt
==
ENUM
)
{
...
...
lib/libvcc/vcc_vmod.c
View file @
818f00c6
...
...
@@ -119,7 +119,7 @@ vcc_ParseImport(struct vcc *tl)
VSB_printf
(
ifp
->
ini
,
"
\t\t
return(1);"
);
/* XXX: zero the function pointer structure ?*/
VSB_printf
(
ifp
->
fin
,
"
\t
vmod
_priv_fini(&vmod_priv_%.*s);"
,
PF
(
mod
));
VSB_printf
(
ifp
->
fin
,
"
\t
VRT
_priv_fini(&vmod_priv_%.*s);"
,
PF
(
mod
));
VSB_printf
(
ifp
->
fin
,
"
\n\t
VRT_Vmod_Fini(&VGC_vmod_%.*s);"
,
PF
(
mod
));
ifp
=
NULL
;
...
...
lib/libvmod_debug/vmod_debug.c
View file @
818f00c6
...
...
@@ -126,6 +126,6 @@ vmod_blob2hex(const struct vrt_ctx *ctx, VCL_BLOB b)
p
+=
2
;
q
+=
1
;
}
vmod
_priv_fini
(
b
);
VRT
_priv_fini
(
b
);
return
(
s
);
}
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