Commit fa7b4f2b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use the new VCL_* typedefs.

parent 0b877e6a
......@@ -46,20 +46,20 @@ else:
specfile = "vmod.vcc"
ctypes = {
'IP': "struct sockaddr_storage *",
'STRING': "const char *",
'STRING_LIST': "const char *, ...",
'BOOL': "unsigned",
'BACKEND': "struct director *",
'ENUM': "const char *",
'TIME': "double",
'REAL': "double",
'DURATION': "double",
'INT': "long",
'BACKEND': "VCL_BACKEND",
'BOOL': "VCL_BOOL",
'DURATION': "VCL_DURATION",
'ENUM': "VCL_ENUM",
'HEADER': "const struct gethdr_s *",
'PRIV_VCL': "struct vmod_priv *",
'INT': "VCL_INT",
'IP': "VCL_IP",
'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",
}
#######################################################################
......
......@@ -35,7 +35,7 @@
#include "vrt.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, ...)
{
va_list ap;
......@@ -48,8 +48,8 @@ vmod_panic(struct req *req, const char *str, ...)
VAS_Fail("VCL", "", 0, b, 0, VAS_VCL);
}
const char * __match_proto__(td_debug_author)
vmod_author(struct req *req, const char *id)
VCL_STRING __match_proto__(td_debug_author)
vmod_author(struct req *req, VCL_ENUM id)
{
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
......@@ -74,7 +74,7 @@ init_function(struct vmod_priv *priv, const struct VCL_conf *cfg)
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)
{
......@@ -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)
{
......
......@@ -45,8 +45,8 @@
#include "vcc_if.h"
void __match_proto__(td_std_set_ip_tos)
vmod_set_ip_tos(struct req *req, long tos)
VCL_VOID __match_proto__(td_std_set_ip_tos)
vmod_set_ip_tos(struct req *req, VCL_INT tos)
{
int itos = tos;
......@@ -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, ...)
{
const char *p;
......@@ -104,7 +104,7 @@ vmod_toupper(struct req *req, const char *s, ...)
return (p);
}
const char * __match_proto__(td_std_tolower)
VCL_STRING __match_proto__(td_std_tolower)
vmod_tolower(struct req *req, const char *s, ...)
{
const char *p;
......@@ -117,8 +117,8 @@ vmod_tolower(struct req *req, const char *s, ...)
return (p);
}
double __match_proto__(td_std_random)
vmod_random(struct req *req, double lo, double hi)
VCL_REAL __match_proto__(td_std_random)
vmod_random(struct req *req, VCL_REAL lo, VCL_REAL hi)
{
double a;
......@@ -129,7 +129,7 @@ vmod_random(struct req *req, double lo, double hi)
return (a);
}
void __match_proto__(td_std_log)
VCL_VOID __match_proto__(td_std_log)
vmod_log(struct req *req, const char *fmt, ...)
{
unsigned u;
......@@ -150,8 +150,8 @@ vmod_log(struct req *req, const char *fmt, ...)
WS_Release(req->ws, 0);
}
void __match_proto__(td_std_syslog)
vmod_syslog(struct req *req, long fac, const char *fmt, ...)
VCL_VOID __match_proto__(td_std_syslog)
vmod_syslog(struct req *req, VCL_INT fac, const char *fmt, ...)
{
char *p;
unsigned u;
......@@ -168,7 +168,7 @@ vmod_syslog(struct req *req, long fac, const char *fmt, ...)
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)
{
......
......@@ -38,8 +38,8 @@
#include "vrt.h"
#include "vcc_if.h"
double __match_proto__()
vmod_duration(struct req *req, const char *p, double d)
VCL_DURATION __match_proto__()
vmod_duration(struct req *req, const char *p, VCL_DURATION d)
{
char *e;
double r;
......@@ -88,8 +88,8 @@ vmod_duration(struct req *req, const char *p, double d)
return (r);
}
long __match_proto__()
vmod_integer(struct req *req, const char *p, long i)
VCL_INT __match_proto__()
vmod_integer(struct req *req, const char *p, VCL_INT i)
{
char *e;
long r;
......
......@@ -82,8 +82,8 @@ free_frfile(void *ptr)
}
}
const char * __match_proto__(td_std_fileread)
vmod_fileread(struct req *req, struct vmod_priv *priv, const char *file_name)
VCL_STRING __match_proto__(td_std_fileread)
vmod_fileread(struct req *req, struct vmod_priv *priv, VCL_STRING file_name)
{
struct frfile *frf = NULL;
char *s;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment