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
fa7b4f2b
Commit
fa7b4f2b
authored
Oct 19, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the new VCL_* typedefs.
parent
0b877e6a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
33 deletions
+33
-33
vmodtool.py
lib/libvcl/vmodtool.py
+12
-12
vmod_debug.c
lib/libvmod_debug/vmod_debug.c
+5
-5
vmod_std.c
lib/libvmod_std/vmod_std.c
+10
-10
vmod_std_conversions.c
lib/libvmod_std/vmod_std_conversions.c
+4
-4
vmod_std_fileread.c
lib/libvmod_std/vmod_std_fileread.c
+2
-2
No files found.
lib/libvcl/vmodtool.py
View file @
fa7b4f2b
...
@@ -46,20 +46,20 @@ else:
...
@@ -46,20 +46,20 @@ else:
specfile
=
"vmod.vcc"
specfile
=
"vmod.vcc"
ctypes
=
{
ctypes
=
{
'IP'
:
"struct sockaddr_storage *"
,
'BACKEND'
:
"VCL_BACKEND"
,
'STRING'
:
"const char *"
,
'BOOL'
:
"VCL_BOOL"
,
'STRING_LIST'
:
"const char *, ..."
,
'DURATION'
:
"VCL_DURATION"
,
'BOOL'
:
"unsigned"
,
'ENUM'
:
"VCL_ENUM"
,
'BACKEND'
:
"struct director *"
,
'ENUM'
:
"const char *"
,
'TIME'
:
"double"
,
'REAL'
:
"double"
,
'DURATION'
:
"double"
,
'INT'
:
"long"
,
'HEADER'
:
"const struct gethdr_s *"
,
'HEADER'
:
"const struct gethdr_s *"
,
'PRIV_VCL'
:
"struct vmod_priv *"
,
'INT'
:
"VCL_INT"
,
'IP'
:
"VCL_IP"
,
'PRIV_CALL'
:
"struct vmod_priv *"
,
'PRIV_CALL'
:
"struct vmod_priv *"
,
'VOID'
:
"void"
,
'PRIV_VCL'
:
"struct vmod_priv *"
,
'REAL'
:
"VCL_REAL"
,
'STRING'
:
"VCL_STRING"
,
'STRING_LIST'
:
"const char *, ..."
,
'TIME'
:
"VCL_TIME"
,
'VOID'
:
"VCL_VOID"
,
}
}
#######################################################################
#######################################################################
...
...
lib/libvmod_debug/vmod_debug.c
View file @
fa7b4f2b
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
#include "vrt.h"
#include "vrt.h"
#include "vcc_if.h"
#include "vcc_if.h"
void
__match_proto__
(
td_debug_panic
)
VCL_VOID
__match_proto__
(
td_debug_panic
)
vmod_panic
(
struct
req
*
req
,
const
char
*
str
,
...)
vmod_panic
(
struct
req
*
req
,
const
char
*
str
,
...)
{
{
va_list
ap
;
va_list
ap
;
...
@@ -48,8 +48,8 @@ vmod_panic(struct req *req, const char *str, ...)
...
@@ -48,8 +48,8 @@ vmod_panic(struct req *req, const char *str, ...)
VAS_Fail
(
"VCL"
,
""
,
0
,
b
,
0
,
VAS_VCL
);
VAS_Fail
(
"VCL"
,
""
,
0
,
b
,
0
,
VAS_VCL
);
}
}
const
char
*
__match_proto__
(
td_debug_author
)
VCL_STRING
__match_proto__
(
td_debug_author
)
vmod_author
(
struct
req
*
req
,
const
char
*
id
)
vmod_author
(
struct
req
*
req
,
VCL_ENUM
id
)
{
{
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
...
@@ -74,7 +74,7 @@ init_function(struct vmod_priv *priv, const struct VCL_conf *cfg)
...
@@ -74,7 +74,7 @@ init_function(struct vmod_priv *priv, const struct VCL_conf *cfg)
return
(
0
);
return
(
0
);
}
}
void
__match_proto__
(
td_debug_test_priv_call
)
VCL_VOID
__match_proto__
(
td_debug_test_priv_call
)
vmod_test_priv_call
(
struct
req
*
req
,
struct
vmod_priv
*
priv
)
vmod_test_priv_call
(
struct
req
*
req
,
struct
vmod_priv
*
priv
)
{
{
...
@@ -87,7 +87,7 @@ vmod_test_priv_call(struct req *req, struct vmod_priv *priv)
...
@@ -87,7 +87,7 @@ vmod_test_priv_call(struct req *req, struct vmod_priv *priv)
}
}
}
}
void
__match_proto__
(
td_debug_test_priv_vcl
)
VCL_VOID
__match_proto__
(
td_debug_test_priv_vcl
)
vmod_test_priv_vcl
(
struct
req
*
req
,
struct
vmod_priv
*
priv
)
vmod_test_priv_vcl
(
struct
req
*
req
,
struct
vmod_priv
*
priv
)
{
{
...
...
lib/libvmod_std/vmod_std.c
View file @
fa7b4f2b
...
@@ -45,8 +45,8 @@
...
@@ -45,8 +45,8 @@
#include "vcc_if.h"
#include "vcc_if.h"
void
__match_proto__
(
td_std_set_ip_tos
)
VCL_VOID
__match_proto__
(
td_std_set_ip_tos
)
vmod_set_ip_tos
(
struct
req
*
req
,
long
tos
)
vmod_set_ip_tos
(
struct
req
*
req
,
VCL_INT
tos
)
{
{
int
itos
=
tos
;
int
itos
=
tos
;
...
@@ -91,7 +91,7 @@ vmod_updown(struct req *req, int up, const char *s, va_list ap)
...
@@ -91,7 +91,7 @@ vmod_updown(struct req *req, int up, const char *s, va_list ap)
}
}
}
}
const
char
*
__match_proto__
(
td_std_toupper
)
VCL_STRING
__match_proto__
(
td_std_toupper
)
vmod_toupper
(
struct
req
*
req
,
const
char
*
s
,
...)
vmod_toupper
(
struct
req
*
req
,
const
char
*
s
,
...)
{
{
const
char
*
p
;
const
char
*
p
;
...
@@ -104,7 +104,7 @@ vmod_toupper(struct req *req, const char *s, ...)
...
@@ -104,7 +104,7 @@ vmod_toupper(struct req *req, const char *s, ...)
return
(
p
);
return
(
p
);
}
}
const
char
*
__match_proto__
(
td_std_tolower
)
VCL_STRING
__match_proto__
(
td_std_tolower
)
vmod_tolower
(
struct
req
*
req
,
const
char
*
s
,
...)
vmod_tolower
(
struct
req
*
req
,
const
char
*
s
,
...)
{
{
const
char
*
p
;
const
char
*
p
;
...
@@ -117,8 +117,8 @@ vmod_tolower(struct req *req, const char *s, ...)
...
@@ -117,8 +117,8 @@ vmod_tolower(struct req *req, const char *s, ...)
return
(
p
);
return
(
p
);
}
}
double
__match_proto__
(
td_std_random
)
VCL_REAL
__match_proto__
(
td_std_random
)
vmod_random
(
struct
req
*
req
,
double
lo
,
double
hi
)
vmod_random
(
struct
req
*
req
,
VCL_REAL
lo
,
VCL_REAL
hi
)
{
{
double
a
;
double
a
;
...
@@ -129,7 +129,7 @@ vmod_random(struct req *req, double lo, double hi)
...
@@ -129,7 +129,7 @@ vmod_random(struct req *req, double lo, double hi)
return
(
a
);
return
(
a
);
}
}
void
__match_proto__
(
td_std_log
)
VCL_VOID
__match_proto__
(
td_std_log
)
vmod_log
(
struct
req
*
req
,
const
char
*
fmt
,
...)
vmod_log
(
struct
req
*
req
,
const
char
*
fmt
,
...)
{
{
unsigned
u
;
unsigned
u
;
...
@@ -150,8 +150,8 @@ vmod_log(struct req *req, const char *fmt, ...)
...
@@ -150,8 +150,8 @@ vmod_log(struct req *req, const char *fmt, ...)
WS_Release
(
req
->
ws
,
0
);
WS_Release
(
req
->
ws
,
0
);
}
}
void
__match_proto__
(
td_std_syslog
)
VCL_VOID
__match_proto__
(
td_std_syslog
)
vmod_syslog
(
struct
req
*
req
,
long
fac
,
const
char
*
fmt
,
...)
vmod_syslog
(
struct
req
*
req
,
VCL_INT
fac
,
const
char
*
fmt
,
...)
{
{
char
*
p
;
char
*
p
;
unsigned
u
;
unsigned
u
;
...
@@ -168,7 +168,7 @@ vmod_syslog(struct req *req, long fac, const char *fmt, ...)
...
@@ -168,7 +168,7 @@ vmod_syslog(struct req *req, long fac, const char *fmt, ...)
WS_Release
(
req
->
ws
,
0
);
WS_Release
(
req
->
ws
,
0
);
}
}
void
__match_proto__
(
td_std_collect
)
VCL_VOID
__match_proto__
(
td_std_collect
)
vmod_collect
(
struct
req
*
req
,
const
struct
gethdr_s
*
hdr
)
vmod_collect
(
struct
req
*
req
,
const
struct
gethdr_s
*
hdr
)
{
{
...
...
lib/libvmod_std/vmod_std_conversions.c
View file @
fa7b4f2b
...
@@ -38,8 +38,8 @@
...
@@ -38,8 +38,8 @@
#include "vrt.h"
#include "vrt.h"
#include "vcc_if.h"
#include "vcc_if.h"
double
__match_proto__
()
VCL_DURATION
__match_proto__
()
vmod_duration
(
struct
req
*
req
,
const
char
*
p
,
double
d
)
vmod_duration
(
struct
req
*
req
,
const
char
*
p
,
VCL_DURATION
d
)
{
{
char
*
e
;
char
*
e
;
double
r
;
double
r
;
...
@@ -88,8 +88,8 @@ vmod_duration(struct req *req, const char *p, double d)
...
@@ -88,8 +88,8 @@ vmod_duration(struct req *req, const char *p, double d)
return
(
r
);
return
(
r
);
}
}
long
__match_proto__
()
VCL_INT
__match_proto__
()
vmod_integer
(
struct
req
*
req
,
const
char
*
p
,
long
i
)
vmod_integer
(
struct
req
*
req
,
const
char
*
p
,
VCL_INT
i
)
{
{
char
*
e
;
char
*
e
;
long
r
;
long
r
;
...
...
lib/libvmod_std/vmod_std_fileread.c
View file @
fa7b4f2b
...
@@ -82,8 +82,8 @@ free_frfile(void *ptr)
...
@@ -82,8 +82,8 @@ free_frfile(void *ptr)
}
}
}
}
const
char
*
__match_proto__
(
td_std_fileread
)
VCL_STRING
__match_proto__
(
td_std_fileread
)
vmod_fileread
(
struct
req
*
req
,
struct
vmod_priv
*
priv
,
const
char
*
file_name
)
vmod_fileread
(
struct
req
*
req
,
struct
vmod_priv
*
priv
,
VCL_STRING
file_name
)
{
{
struct
frfile
*
frf
=
NULL
;
struct
frfile
*
frf
=
NULL
;
char
*
s
;
char
*
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